Alona Kaplan has posted comments on this change.

Change subject: aaa: Adding namespace dropdown list to "add user" dialog
......................................................................


Patch Set 8:

(6 comments)

http://gerrit.ovirt.org/#/c/30698/8/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/AdElementListModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/AdElementListModel.java:

Line 71:     {
Line 72:         privateProfile = value;
Line 73:     }
Line 74: 
Line 75:     private ListModel privateNamespace;
Please use generics- private ListModel<String> privateNamespace;
Line 76: 
Line 77:     public void setNamespace(ListModel value) {
Line 78:         privateNamespace = value;
Line 79:     }


Line 196:                 populateProfiles((List<ProfileEntry>) result);
Line 197:                 
getProfile().getSelectedItemChangedEvent().addListener(new IEventListener() {
Line 198:                     @Override
Line 199:                     public void eventRaised(Event ev, Object sender, 
EventArgs args) {
Line 200:                         
getNamespace().setItems(namespacesMap.get(((ProfileEntry) 
getProfile().getSelectedItem()).getAuthz()));
Please check if 'namespacesMap != null'.
Since there is no progress in this dialog. A scenario that the user changed the 
selected profile item before the AAANamespaces query returned might happen.
Line 201:                     }
Line 202:                 });
Line 203:             }
Line 204:         }));


Line 212: namespacesMap
1. Duplicates the code of profile selected item change handler, please extract 
to a method.
or even better, make it as part of populateNameSpaces(..) and call it from both 
of the places.
2. Please chech that getProfile().getSelectedItem() != null
(if the 'AAANamespace' query will return before the profile query, you will 
have a NPE here).


Line 233: populateNamespaces
Never used


Line 378: 
Line 379:     protected void findGroups(String searchString, AsyncQuery query) {
Line 380:         Frontend.getInstance()
Line 381:                 .runQuery(VdcQueryType.Search,
Line 382:                         new DirectorySearchParameters("ADGROUP@" + 
((ProfileEntry) getProfile().getSelectedItem()).getAuthz() + ": " + 
searchString, SearchType.DirectoryGroup, (String) 
getNamespace().getSelectedItem()), query); //$NON-NLS-1$ //$NON-NLS-2$
If you"ll use generics you won't need this cast.
Line 383:     }
Line 384: 
Line 385:     protected void findUsers(String searchString, AsyncQuery query) {
Line 386:         Frontend.getInstance()


Line 388: String
Same.


-- 
To view, visit http://gerrit.ovirt.org/30698
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic78559243c765271bf8e12abd035deba05226bda
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to