java - Tree widget shows only one value from list (GWT) -


i working on gwt app , using com.google.gwt.user.client.ui.tree; , com.google.gwt.user.client.ui.treeitem; widgets show gwtdomain objects rpc method. , every gwtdomain has gwtactions values(in cases read, write, delete not in every case). method finding gwtdomains , in onsuccess methods looking gwtactions gwtdomain:

     gwt_domain_service.findall(new asynccallback<list<gwtdomain>>() {                  @override                 public void onfailure(throwable caught) {                     exitmessage = msgs.dialogaddpermissionerrordomains(caught.getlocalizedmessage());                     exitstatus = false;                     hide();                 }                  @override                 public void onsuccess(list<gwtdomain> result) {                        (final gwtdomain gwtdomain : result) {                         gwt_domain_service.findactionsbydomainname(gwtdomain.name(), new asynccallback<list<gwtaction>>() {                              @override                             public void onfailure(throwable caught) {                                 exitmessage = msgs.dialogaddpermissionerroractions(caught.getlocalizedmessage());                                 exitstatus = false;                                 hide();                             }                              @override                             public void onsuccess(list<gwtaction> result) {                                  (gwtaction gwtaction : result) {                                 rootcheckbox= new checkbox();                                 rootcheckbox.setboxlabel(gwtdomain.tostring());                                     treeitemcheckox = new checkbox();                                      roottreeitem = new treeitem(rootcheckbox);                                     treeitem =  new treeitem(treeitemcheckox);                                     treeitemcheckox.setboxlabel(gwtaction.tostring());                                     roottreeitem.additem(treeitem);                                  }                                 tree.additem(roottreeitem);     }                     });  } 

but code, have 1 value gwtaction not values(in cases should 3 items each treeitem2). helps me?

it's normal. code tree.additem(roottreeitem); outside loop. must inside! regards


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -