PDA

View Full Version : Ext.state.SessionProvider whats the alternative in Ext JS 4



naveedanjum
27 Nov 2011, 10:51 PM
Whats the alternative for Ext.state.SessionProvider in Ext JS 4.

Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState})) ???

tvanzoelen
28 Nov 2011, 1:56 AM
There is a cookie provider available or you can use the HTML5 LocalStorageProvider. If you want to use something else you must implement your own provider I think.



Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now
}))