Fix: wrong list of 'Parent Suggestion' in create-project UI.

In 'Create Project' UI, 'Parent Suggestion' table
shows wrong content. It is caused by [1] where we
use 'ProjectMap.permissions()' style to replace the
deprecated 'Util.PROJECT_SVC.suggestParentCandidates()'
style, however their logic is different. This bug is
fixed by providing an equivalent new method.

[1]https://gerrit-review.googlesource.com/#/c/34477

Change-Id: I1e229c8a0b5d66187c4e89dec2ce1ae72ae0b46c
Signed-off-by: Bruce Zu <bruce.zu@sonymobile.com>
This commit is contained in:
Bruce Zu
2012-06-18 16:01:33 +08:00
committed by Claes Elgemark
parent bb16a8a0c6
commit cdab83e8cd
3 changed files with 110 additions and 75 deletions

View File

@@ -184,16 +184,16 @@ public class CreateProjectScreen extends Screen {
};
suggestedParentsTab.setVisible(false);
ProjectMap.permissions(new GerritCallback<ProjectMap>() {
@Override
public void onSuccess(ProjectMap list) {
if (!list.isEmpty()) {
suggestedParentsTab.setVisible(true);
suggestedParentsTab.display(list);
suggestedParentsTab.finishDisplay();
}
}
});
ProjectMap.parentCandidates(new GerritCallback<ProjectMap>() {
@Override
public void onSuccess(ProjectMap list) {
if (!list.isEmpty()) {
suggestedParentsTab.setVisible(true);
suggestedParentsTab.display(list);
suggestedParentsTab.finishDisplay();
}
}
});
}
private void addGrid(final VerticalPanel fp) {