java - GWT TreeViewModel not working as expected -


i'm trying make celltree in gwt, reason treeviewmodel no working properly

public class channelviewmodel implements treeviewmodel {    @override   public <t> nodeinfo<?> getnodeinfo(t value) {      if(value == null)     {         window.alert("node 0");         return new defaultnodeinfo<channelrepresentation>(new channelasyncdataprovider(), new channelcell() );      } else if(value instanceof channelrepresentation)     {         window.alert("node 1");         channelrepresentation feedchannel = (channelrepresentation) value ;         return new defaultnodeinfo<entryrepresentation>( new entryasyncdataprovider( feedchannel.getchanneluri() ), new feedentrycell() );     }     window.alert("undefined value");     return null;   }    @override   public boolean isleaf(object value) {     if(value instanceof entryrepresentation)     {         window.alert("isleaf: true");         return true;     }     window.alert("isleaf: false");     return false;   } } 

what makes me think problem in treeviewmodel class if make method isleaf() return false starts rendering nodes entry representation.

besides, tested data providers separately , work ok, me problem seems in treeviewmodel. if use of examples of gwt works , think i've tried figure out, highly appreciated

edit: onmoduleload() method if serves something

    public void onmoduleload() {      channelviewmodel model = new channelviewmodel();     celltree tree = new celltree(model, null);      rootlayoutpanel.get().add(tree); } 

i think problem related statement:

celltree tree = new celltree(model, null); 

the second parameter should not null!


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -