Recently i am working on a gwt ext project and i used Navigation tree to list menu items in my home page.. but recently my client ask from me to disable some of the menu items until he process some task..i am really struggle with that and i did not able to find solution..if anyone know a solution please suggest me.. i attached image of my tree and the way i put items to tree
-- private void getApplicationsForUser() {
System.out.print("Method CALLING...");
LoadingMask.show("Permissions & Menu ...");
ProfileService.Util.getInstance().getUserPermissions(new AsyncCallback<List<Application>>() {
public void onSuccess(List<Application> result) {
LoadingMask.hide();
/* Application application = result.get(0);
BaseTreeModel item = new BaseTreeModel();
item.set(NavigationTree.ID, application.getId());
item.set(NavigationTree.NAME, application.getDescription());
navigationTree.getStore().add(item, true);*/
// for (int i = 0; i < 10; i++) {
for (int j = 0; j < result.size(); j++) {
Application application = result.get(j);
BaseTreeModel item = new BaseTreeModel();
item.set(NavigationTree.ID, application.getMid().toString());
item.set(NavigationTree.NAME, application.getMdesc());
// navigationTree.getStore().add(item, false);
if ("PR".equals(application.getMpcode())) {
navigationTree.getStore().add(item, false);
result.remove(j--);
} else {
BaseTreeModel findModel = navigationTree.getStore().findModel(NavigationTree.ID, application.getMpcode());
if (findModel != null) {
navigationTree.getStore().add(findModel, item, false);
result.remove(j--);
navigationTree.setExpanded(findModel, true);
}
}
}
// }
}
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment