PDA

View Full Version : [CLOSED] Problem in the method SetValues ​​of formPanel



rbruno
24 Oct 2012, 8:42 AM
REQUIRED INFORMATION

Ext version tested:

SenchaTouch 2.0.1.1
Browser versions tested against:

Chrome 22
Description:

Steps to reproduce the problem:

create a FormPanel with 3 or more radioFields with the same name and try to set the value of this field
The result that was expected:

assign the value
The result that occurs instead:

not assign the value of the field
Test Case:
var form = Ext.Viewport.add({xtype : 'formpanel'
items: [{
xtype: 'fieldset',
title: 'Tipo de búsqueda',
defaults: {
xtype: 'radiofield',
name : 'searchType',
labelAlign: 'left',
labelWidth: '45%'
},
items: [
{ label: 'Cercana', value: '4'},
{ label: 'Vista Actual', value: '5'},
{ label: 'General', value: '2' }
]
}]
});


form.setValues({searchType : '2'});
Debugging already done:

none
Possible fix:

Changue in the file sdk/src/form/panel.js lines 497 to 499 for this:
if (f.isRadio && value == f.originalValue) {// If it is a radio field just use setGroupValue which will handle all of the radio fields f.setChecked(true);

mitchellsimoens
24 Oct 2012, 11:46 AM
This has already been solved, you can test in 2.1.0 RC2