Question

I updated to Ext 3.3 and suddenly my GridPanel's column "width" and "hidden" settings are not restored anymore, they remain at their default settings. I use the most recent version of the Buffering Http Provider. I don't really know the reason of the fault, if it's because of this State Provider implementation or the underyling state mechanism of Ext.

"Saving" the settings seems to work correctly, the handler will be called and the settings will be stored correctly to the database. The settings are also being read correctly from the database again, and my output to the client contains the correct settings.

My (partly server-generated) code hasn't changed recently, and it looks something like this:

var someState = [{"name":"someGridPanel","value":"o%3Acolumns%3Da%253Ao%25253Aid%25253Ds%2525253ADate%25255Ewidth%25253Dn%2525253A80%255Eo%25253Aid%25253Ds%2525253AMailSender%25255Ewidth%25253Dn%2525253A100%25255Ehidden%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253ASubject%25255Ewidth%25253Dn%2525253A286%255Eo%25253Aid%25253Ds%2525253A ... "} ...];

Ext.state.Manager.setProvider(new Ext.ux.state.HttpProvider({saveUrl: 'someHandler.ashx'}));
Ext.state.Manager.getProvider().initState(someState);

// later...

var someGridPanel = new Ext.grid.GridPanel({"id":"someGridPanel","colModel":someColumnModel, ... });

Did anything important change in the state mechanisms that I missed? The documentation says I don't need to specify a stateId when I set an id for a component. But I see that there is now a Column object in the Ext documentation that wasn't there before. Maybe these need an id now?

Any hints and help would be greatly appreciated.

Was it helpful?

Solution

Got the answer in a forum post, the issue is in ExtJs 3.3 itself. This override works for me:

Ext.override(Ext.grid.ColumnModel, {
    setState: function (col, state) {
        Ext.apply(this.lookup[col], state);
    }
});

Update: It's fixed now in 3.3.1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top