View Full Version : Combobox save-restore state

20 Oct 2011, 11:41 AM
Hello everybody,

I have problem. I cant save and then restore value for ExtJS 4 Combobox via stateful (data is dynamic and loading from DB).

I see created cookie with correct value but looks like that on combo creation the stateful value is loaded before loading full list from DB....

Can anyone advise?

22 Oct 2011, 11:15 AM
Any Idea?

25 Oct 2011, 10:18 AM
Any one ?

28 Dec 2011, 2:33 PM
I'm not sure of your exact need but you have to have these in your combobox config:

stateId: 'foo',
stateEvents: ['change'], // and whatever else you need
getState: function() {
return {value: this.getValue()};
applyState: function(state) {

Hope this helps,

8 May 2012, 12:54 AM
Don't forget to add this for Ext JS 4.1.0 if you want your field to be stateful:

stateful: true

Ext JS 4.0.7 didn't need it to be stateful if other state properties were set.