Reputation: 2813
TreeGrid stateful option does not seem to work in GXT 3.0.1.
I do use
setStateful(true);
setStateId("state-id");
But the state is not saved. I do not use a custom StateProvider, so I expect the state to be stored in cookies, but there's nothing there.
Update:
I've spent some time looking at the source code and it looks like I need to create a custom StateManager to handle TreeGrid state.
Seems to be strange, because in GXT 2.2.x it is enought to call setStateful(true)
and the component will save it's state when changed.
Any help is highly appreciated.
Upvotes: 0
Views: 911
Reputation: 1115
By default, GXT initializes the StateManager with a CookieProvider. Actually many answers about StateManager can be found here http://www.sencha.com/blog/ext-gwt-3-0-state-api However in your particular case you have to add the state handler for reloading compoment's properties from coookies. Something like this:
new GridStateHandler<Row>(treeGrid, treeGrid.getStateId()).loadState();
Upvotes: 1