PDA

View Full Version : Problem saving state with radiogroups selections



vibez
6 Mar 2008, 1:04 PM
I've successfully managed to persist for values using Ext.state.Manager in all form elements except radiogroups.

Here is my radio group item



xtype:'ux-radiogroup'
,fieldLabel:'Range'
,name:'range'
,horizontal:true
,radios:[{
value:'months',
boxLabel:'Months',
checked: Ext.state.Manager.get('months', true) // retrieve stored value if set. get(cookie name, value if cookie not found)
},{
value:'weeks',
boxLabel:'Weeks',
checked: Ext.state.Manager.get('weeks', false) // retrieve stored value if set. get(cookie name, value if cookie not found)
}]
}


I have my state.Manager running on the checked: config option. What I want to do it retrieve the saved state for each radiobox if it has been stored.

The problem is that instead of the checked state getting saved in the cookie as either 'true/false', it is stored as 'on' instead of either 'checked' or 'true'.

Can anyone help me figure out the best way to persist a radiogroup selection