PDA

View Full Version : form.updateRecord and RadioButton



hille_r
10 Sep 2008, 7:01 AM
Hello,

i am confuse about the radiobutton. I have some radiobutton's in a fieldset. All radiobutton have the same name and each radiobutton have a unique inputValue.

After initialized loaded xml data the radiobutton which inputValue is equal the field (name is the same as the radiobutton name) is selected.

But when i changed the radiobutton and call the form.updateRecord the value for the field has the valu false and not the inputValue from the radioButton which is checked.

Can't i use the updaeRecord function for radiobutton or what is wrong.


LoadCriteria: function(form){

form.getForm().loadRecord(criteriaStore.getAt(0));
},

UpdateCriteria: function(form){
form.getForm().updateRecord(criteriaStore.getAt(0));

},

hille_r
11 Sep 2008, 3:07 AM
hi,

i findd by my self a workaround - it works but it's look like unfriendly because i have to add for each radiobutton group a pice of code




UpdateCriteria: function(form)
{

form.getForm().updateRecord(criteriaStore.getAt(0));


// special for radiobutton inputValue
//
criteriaStore.getAt(0).data.sortby = Ext.ComponentMgr.get('sortby').getGroupValue();
},