View Full Version : tree node expansion problem"nodes get duplicated"

21 Jul 2009, 6:37 AM
Hi ,

I tried the way the fast tree handles the expansion on nodes.
i channged my onClick to before expand event: its works fine but the thing is the older node stays there in the tree, if i try to remove it and then on top of it add my node its throws null pointer....
this entire code is inside the BeforeExpand event method and earlier with the onClick event this peice of code used to work fine.
can you please help me with it ,
I am attaching the code snippet, i pass this ritem from the event , its of type TreeItem
and nodeStore is my list of modeldata to be added to the tree
if i delete the tSore.remove stmt , it works good but then the older node stays there
plz help

TreeModel treeRoot = (TreeModel) ritem.getModel();
TreeItem parent = ritem.getParentItem();
TreeModel mParent= (TreeModel)parent.getModel();

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

22 Jun 2010, 3:45 AM
I've got the same problem

22 Jun 2010, 6:38 AM
I've got the same problem

Can yo please post a fully working testcase that implements EntryPoint for this?