【发布时间】:2012-05-29 17:45:14
【问题描述】:
我正在使用 FormPanel 中的 xtype 在 extJS 4 中创建一个 radioGroup。我正在尝试在检查收音机后立即启用/禁用文本字段。
{
xtype: 'radiogroup',
fieldLabel: 'Enable / Disable ',
columns: 2,
vertical: true,
items: [
{boxLabel: 'Enable', name: 'formtype', inputValue: '1'},
{boxLabel: 'Disable', name: 'formtype', inputValue:'2',checked:true},
]
}
我很困惑在哪里添加检查/单击事件的侦听器。提前致谢。
【问题讨论】:
-
我尝试添加这种方式,但为什么它显示 alert() 2 次?
-
监听器:{ "change" : function(field, newValue, oldValue, eOpts ){ alert(this.items); } }
标签: extjs radio-button radio-group ext4