PDA

View Full Version : cookieprovder



pinidbest
2 Oct 2012, 9:30 PM
Hi all,
I have an Ext.window tha holds as a varibable a mixed collection whcih I want to save using the state provider.

Could find a sample for making it work.

On the initComponent I wrote:


var stateProvider = Ext.create('Ext.state.CookieProvider', {
path: "/xxx/",
expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 60)), //60 days domain: "xxx.com"
});
this.stateProvider = stateProvider;
Ext.state.Manager.setProvider(stateProvider);


And I have used set for the collection like this:
this.stateProvider.set(this.stateKey, this.stickyChartsCollection);

And I tried the get method on the initcomponent and nothing works
Any ideas?

scottmartin
6 Oct 2012, 9:49 AM
Is the cookie populated and have you verified the object is valid?

Scott.

pinidbest
8 Oct 2012, 6:57 PM
And this is a simple mixed collection.
Can you supply a working code demo that I can save some array into a cookie and get it back?