PDA

View Full Version : Ext.state.Manager.getProvider().destroy method giving error



sudhir.gupta.eck
5 Oct 2016, 12:00 AM
Hi,

I am working on EXTJS 3.4 application where I need to save user preferences.
I am using below code and its working perfectly fine for saving preferences via cookies.

var cp = new Ext.state.CookieProvider({
expires: new Date(new Date().getTime()+(1000*60*60*24*30)) //30 days
});
Ext.state.Manager.setProvider(cp);
var grid = new Ext.grid.EditorGridPanel({
store: store,
cm: cm,
stateful: true,
stateId: 'mygridState',
..........................................................)}

But when I try to logout the application, I am getting below error from EXTJS framwork

" Uncaught TypeError: Ext.state.Manager.getProvider(...).destroy is not a function "

I have below questions ;

1) How can I handle this error?
2) I dont want to clear cache when user logout from the application.
3) Can it be possible to not to write any code in logout function , or I can declare something where I have created cookies because our application is hosted under other application and sign out method dosent fall in our application.

Any inputs will be really helpful.

Gary Schlosberg
5 Oct 2016, 11:11 AM
Duplicate: https://www.sencha.com/forum/showthread.php?329720

sudhir.gupta.eck
12 Oct 2016, 11:53 PM
closing this thread as its duplicate.