Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 30))//30 days
}));
Field Example:
{
xtype: 'textfield',
fieldLabel: 'Логин',
name: 'UserName',
allowBlank: false,
validateOnBlur: false,
blankText: 'Введите логин',
stateful: true,
stateId: 'UserName',
stateEvents: ['blur'],
getState: function () {
return { value: this.getValue() };
},
applyState: function (state) {
this.setValue(state.value);
}
}
Немає коментарів:
Дописати коментар