-
Sencha User
Tree nodes gets displayed twice.
Hi ,
I am creating a tree in a form panel. So when i first save that data in the form panel including input i have given to the tree. It gets saved to the backend.. While on editing that form data, I get the tree nodes to be displayeed twice.
For eg: I have a tree
Node1
|- subnode1
|- subnode2
Node2
|-subnode3
|-subnode4
Node these Nodes are replicated while editing the form data.
What I am doing is that I am calling formPanel.load(function(){
// where i am again calling
tree.getLoader().load(tree.getRootNode(),function(){
//something i do to the tree..
},
}
somehow there is a timing issue here which i am not able to figure out. Can anyone help me its urgent.
Thanks in advance.
Herat
-
Sencha User
Please help me out here.. Kinda stuck on that.
-
Sencha Premium Member
It is probably because you aren't clearing the children on load.
Take a look at:
http://docs.sencha.com/extjs/3.4.0/#...fg-clearOnLoad
-
Sencha User
It doesnt work
. It says it defaults to true. I havent set any property like that. So it should default to true .
-
Sencha Premium Member
Without any code, its kinda of difficult to provide any good feedback. Use chrome or firebug and step through the load method. You should see the root node's children be removed in the first call. If they are then, your problem is probably related to your data.
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