rchen5990@gmail.com
14 Nov 2012, 12:09 PM
Hi All,
I am migrating my Ext JS 3 app to 4 and I am running into a little trouble with radiogroup.
var testSearchCriteria = Ext.create('Ext.form.Panel',{
items: [{
xtype: 'radiogroup',
fieldLabel: 'Test Search Criteria',
columns : 1,
id: 'testSearchCriteria',
name: 'testSearchCriteria',
margins : '10 10 10 10',
items: [
{boxLabel: 'Test Suite Tango Id', name: 'id-1', inputValue : 'testSuiteTangoId', checked: true},
{boxLabel: 'Test Case Tango Id', name: 'id-1', inputValue : 'testCaseTangoId'},
{boxLabel: 'Test Area', name: 'id-1', inputValue : 'testArea'}
],
listeners:{
change : function(radiogroup,radio){
if(radio.getGroupValue == 'testSuiteTangoId'){
testTangoIdSearchKeyTextField.hide();
testAreaCombo.hide();
suiteTangoIdTextField.show();
} else if(radio.getGroupValue == 'testCaseTangoId') {
testTangoIdSearchKeyTextField.show();
suiteTangoIdTextField.hide();
testAreaCombo.hide();
} else if (radio.getGroupValue() == 'testArea'){
testTangoIdSearchKeyTextField.hide();
suiteTangoIdTextField.hide();
testAreaCombo.show();
}
}
}
}]
});
I get an error Uncaught TypeError: Object #<Object> has no method 'getValue'
Any help would be greatly appreciated.
Thanks,
Rich
I am migrating my Ext JS 3 app to 4 and I am running into a little trouble with radiogroup.
var testSearchCriteria = Ext.create('Ext.form.Panel',{
items: [{
xtype: 'radiogroup',
fieldLabel: 'Test Search Criteria',
columns : 1,
id: 'testSearchCriteria',
name: 'testSearchCriteria',
margins : '10 10 10 10',
items: [
{boxLabel: 'Test Suite Tango Id', name: 'id-1', inputValue : 'testSuiteTangoId', checked: true},
{boxLabel: 'Test Case Tango Id', name: 'id-1', inputValue : 'testCaseTangoId'},
{boxLabel: 'Test Area', name: 'id-1', inputValue : 'testArea'}
],
listeners:{
change : function(radiogroup,radio){
if(radio.getGroupValue == 'testSuiteTangoId'){
testTangoIdSearchKeyTextField.hide();
testAreaCombo.hide();
suiteTangoIdTextField.show();
} else if(radio.getGroupValue == 'testCaseTangoId') {
testTangoIdSearchKeyTextField.show();
suiteTangoIdTextField.hide();
testAreaCombo.hide();
} else if (radio.getGroupValue() == 'testArea'){
testTangoIdSearchKeyTextField.hide();
suiteTangoIdTextField.hide();
testAreaCombo.show();
}
}
}
}]
});
I get an error Uncaught TypeError: Object #<Object> has no method 'getValue'
Any help would be greatly appreciated.
Thanks,
Rich