For example I've selected item1 in my TreePanel:

Then I select item2:

After this my page reloads and the expanded states of folder1 and folder11 change to collapsed. And only folder2 and folder22 are expanded. I need to save the state of all folders that were expanded before.

P.s. I Java EE project. Also I've read here that I need to use "a ModelKeyProvider must specified with the TreeStore this tree is bound to". But there is no explanation how to do this. Any ideas?