PDA

View Full Version : State not saving in text box



bradlymathews
20 Jan 2012, 4:14 PM
Hello,

State is not working for me on form text boxes.

I am setting up the state manager using:

Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));

I am then creating a textbox like:

{
fieldLabel: '<span style="color:red;">*</span> First Name',
allowBlank: false,
id: 'nameOnCardFirst',
stateful: true, // Is this even needed in 4.0.7? Demo does not use it.
stateId: 'statenameOnCardFirst',
stateEvents: ['change'], // Again, needed? Demo does not use it.
name: 'nameOnCardFirst'
}


I enter a value in the field, move off the field to trigger the change event, refresh the page and the field is blank.

What am I missing?

Thanks,
Brad

jay@moduscreate.com
25 Jan 2012, 11:29 AM
I don't think textbox is a stateful widget.