Maintain the states of open nodes

I am doing a web application in which when we click on a node,a function is called to load a new page in the same window.In doing so,I want to keep the previous open state of nodes intact.how is it possible?

i tried doing

tree.selectItem(id);

tree.openItem(id);

tree.focusItem(id);

but this is not working.

What should i do?


These methods should be called after tree is completely loaded:


tree.loadXML(“tree.xml”,doAfterLoading);


function doAfterLoading(){


tree.selectItem(id);
tree.openItem(id);
tree.focusItem(id);



}