-
Sencha Premium Member
Answered: clearOnLoad in a treestore problems (how to load the same node twice as child)
I have to load a tree in which the child nodes are the same for many parent nodes.
Eg
parent1
|
--child1
|
parent2
|
--child1
--child2
|
parent3
|
--child2
--child3
and so on.
I have created an Ext.data.treeStore and am loading the children by chnaging the url in the beforeload listener.
Now the problem is, my store removes all duplicates(i cannot load child1 twice onto the store) and hence am not able to expand my tree
Note that the following works
parent1
|
--child1
|
parent2
|
--child2
|
parent3
|
--child3
I ahve tried setting clearOnLoad to false and a few other things but not getting anywhere.
Any input and directions would greatly help! please
Thanks
-
Best Answer Posted by
James Goddard
You cannot have two items in the same tree with the same id. If you need to have the same item in multiple paths in the tree it will have to have a unique id for each instance.
-
Ext JS Premium Member
You cannot have two items in the same tree with the same id. If you need to have the same item in multiple paths in the tree it will have to have a unique id for each instance.
-
Sencha Premium Member
Thanks
that helps. I have changed the model to return nodes with unique ids even though their content is the same.
I am suprised a treestore cannot have same child nodes in the store!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules