PDA

View Full Version : Add Listner to TreeNodes



saurabhsingh
6 Jul 2009, 10:06 AM
Hi,
I am very new to gwt-ext, i am using ext-js to build my project
I am building a tree, in which the child nodes are getting created by onClick event of its parent item.
Now I want to do some proccessing on the dynamically created nodes by doubleclicking on it.
I am not able to register the listner to the tree at the time of child nodeCreation.
Please help, i am stuck with it

thanx

saurabhsingh
6 Jul 2009, 12:09 PM
Hi,
i am making the dynamic nodes like this,

nodeStore =(TreeNodes)treeRoot;
nodeStore.removeAll();

for (int row = 0,y=0 ; itt.hasNext(); row++,y++){


nodeStore.add(new TreeNodes(((UserTree)itt.next()).toString(),oLoadChild.get(row).getItemID(),oLoadChild.get(row).getItemType(),oLoadChild.get(row).getParentID(),oLoadChild.get(row).getIsStructured()));


}// end of iterator


tStore.remove((BaseTreeModel<TreeModel>) mParent,(BaseTreeModel<TreeModel>) treeRoot);
tStore.insert((BaseTreeModel<TreeModel>) mParent,nodeStore, index, true);
tStore.update((BaseTreeModel<TreeModel>) mParent);