PDA

View Full Version : Problem for reload the tree



chuvinha
29 Oct 2010, 8:19 AM
Hi guys, i am not able to reload my tree.
When the user insert a new node, iam using the:


panelTree.getRootNode().reload();

And the tree reload all again.
I don't want this.
I want that the tree keep opened whrere on the node was inserted.

Could someone help me?

plalx
29 Oct 2010, 11:53 AM
Why do you need to reload the tree after inserting a new node?

chuvinha
1 Nov 2010, 3:14 AM
Then scarsick, if I don't make reload it doesn't appears the new node that I inserted.
That' why I need to load the tree again.
Did you undertand?

Condor
1 Nov 2010, 3:43 AM
You will need to remember all the expanded state of all nodes and apply them after the tree has loaded.

ps. You don't always have to reload the root node, you only need to reload the parent node to which to new node was added.

chuvinha
1 Nov 2010, 4:40 AM
I get it Condor.
My code is as follows:



var successCRUD = function (resp,opt){
Ext.ComponentMgr.get(panelAtributo.node).getStore().reload();
Ext.getCmp('popupAtributo').hide();
}


But it isn't work.
Do you have some idea?

Condor
1 Nov 2010, 4:49 AM
I have no idea what you are doing here. You'll have to explain better.