PDA

View Full Version : EXT JS 4.1. Ext.State.Manager not working anymore



A.Wagner
8 Jul 2012, 11:23 PM
Hi,

I used the Ext.State.Manager to handle Preference settings for my Applications. That for I wrote a new provider class that worked fine on ExtJs 4.0.7 commercial. Now I changed the framework to 4.1.1 commercial and the state manager not working anymore.

To test this behaviour I switch the provider to CookieProvider (Which is part of the framework) which is working fine in 4.0.7. but not in 4.1.1. So I guess this issue isn't a provider, but state manager or stateful behaviour issue.

Extra info:
I tested if the components send some kind of 'save the state' events. In 4.0.7 they do but not in 4.1.1..
I tested it also in 4.1. gpl. Same behavoiur like 4.1.1.

Question:

Is there any change how to handle states and the manager between 4.0.7 and 4.1?

Thanks in advance.

scottmartin
10 Jul 2012, 5:46 PM
This example uses our state manager to save the changes to the grid:
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/grid/array-grid.html

If you move price to the first column and set the sort on change, then refresh page .. it will be the same.

Perhaps there is another problem?

Scott.

A.Wagner
11 Jul 2012, 5:05 AM
Hi,

I guess for a better understandig I have to quote the part of code where:



var provider;
var form = this.down('#loginForm').getForm();
if (form.isValid()) {
form.submit({
success: function(form, action) {
provider = new Ext.ux.state.AppUserProfilProvider(
{
app: 'QMSearchApp',
success: function () {
Ext.state.Manager.setProvider(provider);




Ext.Ajax.request({
url: '/api/rest/session/info',
success: function(response) {
var jsonObject = Ext.decode(response.responseText);



MyGlobals.loginName = jsonObject.userFullName;
MyGlobals.viewPort.switchPanel('agorumqmsearch.view.QMSearchPanel');
},
failure: function(form, action) {
MyGlobals.viewPort.switchPanel('agorumqmsearch.view.LoginPanel');
}
});

}
}
);
},
failure: function(form, action) {
Ext.Msg.alert('Login','Benutzername oder Passwort falsch, bitte erneut versuchen ...');
}
});
}


The provider works fine within 4.0.7 . So may I could not use "new AppUserProfileProvider" ????

scottmartin
11 Jul 2012, 10:51 AM
I have not dove into this part of the code .. here is a state management that works using remote storage. Perhaps it can provide some insight on your UX:
http://www.sencha.com/forum/showthread.php?141207

Scott.

A.Wagner
12 Jul 2012, 9:43 AM
Anyway the problem is that the state manager in 4.1.1 also not working with the CookieProvider which is part of the framework.

So of course my first idea was that my provider didn't work. So I tested it with the CookieProvider that way

Ext.state.Manager.setProvider(new Ext.state.CookieProvider (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.state.CookieProvider)()).

It didn't work too.

scottmartin
12 Jul 2012, 10:54 AM
Please issue a bug report with a working test case:
http://www.sencha.com/forum/showthread.php?138165-How-to-report-a-bug

Regards,
Scott.