PDA

View Full Version : Problem with cookieProvider and statefull



kseregal
16 Jan 2019, 12:00 AM
Hello.
Sorry for my bad english.
Now I understand Ext.state.Stateful. I use cookieProvider.
Conceptually, I can not understand one thing.
Everything seems to work, cookies are created, events occur.
But why at the start of the application (f5 in the browser) does the statesave event fire and erase all states?
What about? It turns out that the state can be stored only while the application is running. Those. F5 clicked, and all the states flew off? I am using 6.2 gplv3


See the demonstration here https://fiddle.sencha.com/#view/editor&fiddle/2p30
If you click Run, then hide one of the columns, then click Run again.
As a result, this column will again be visible.

kseregal
16 Jan 2019, 12:17 AM
fixed
Ext.state.Manager.setProvider should be in the init method, not in the launch method

init: function(application) {
Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));

}

mitchellsimoens
22 Jan 2019, 11:00 AM
You should also post in the correct forum as this is the for the Sencha Fiddle tool itself not for Ext JS.