View Full Version : Reloading a tree

20 Nov 2011, 8:32 AM

I want to reload a tree from an ajax-source. I've already done this in 3.x. But in 4.0 it seems to be more complicate and confusing to me.

I already tried:

tree.getStore().load({node: node})
This reloads the complete tree or the given node. But also all child nodes will be collapsed after that, no matter of the state before.

I also read about the stateful flag. But I think it is the wrong way, cause - according to the doc - there is no logic implemented.

How can I reload a single node without affecting the state of the child nodes? Or how can I save the expand/collapse state and restore it after the reload?

Thank you for helping

20 Nov 2011, 12:17 PM
You are reloading a node which will delete all child nodes so to reexpand it you will need to get what is expanded and expand it after the node is loaded.

20 Nov 2011, 12:36 PM
Yes, that was my question :)