如何从extjs中的无线电组中获取所选输入标签值

时间:2013-05-27 10:15:25

标签: extjs extjs4.1 sencha-architect extjs4.2

有人能告诉我如何从extjs中的无线电组中获取所选输入标签值吗?我把广播组放在一个表格中。我需要在onChangemethod

中的控制器中获取所选的输入Label值
onChangeAspectsradio: function (radioField, newVal, oldVal, eOpts){         
      console.log("new value is"+newVal); //here am getting object only             
},

由于

2 个答案:

答案 0 :(得分:1)

尝试newVal.individual

onChangeAspectsradio: function (radioField, newVal, oldVal, eOpts){
      console.log("new value is"+newVal.individual); 
},

答案 1 :(得分:0)

Ext.ComponentQuery.query('[name=test]')[0].getGroupValue();

{
    xtype          : 'radiofield',
    name           : 'test',
    inputValue     : '30',
    hideEmptyLabel : false,
    boxLabel       : 'testBox'
}
试试这个,应该有所帮助。请记住设置广播的inputValue属性