现在在学extjs4,遇到个问题,无法给checkGroup和radioGroup绑定check事件, 包括其中的checkbox和radio也无法绑定,贴上代码:
var radioPanel = Ext.create("Ext.panel.Panel", {
id : "radioPanel",
title : "单选框Panel",
flex : 1,
renderTo : "orderInfoPage",
items : [ {
xtype : "radiogroup",
id : "dd_s",
fieldLabel : "属性dd",
name : "dd_s",
items : [ {
boxLabel : "Item 1",
name : "dd_s",
inputValue : 1,
listeners : {
"check" : function(el, checked) {
alert(1);
if (checked) {//只有在点击时触发
alert(2);
}
}
}
}, {
boxLabel : "Item 2",
name : "dd_s",
inputValue : 2,
checked : true
}, {
boxLabel : "Item 3",
name : "dd_s",
inputValue : 3
} ]
}]
});
此代码显示没问题,但是选中与取消选中复选框时不会触发事件,请问该怎么写extjs4checkGroupradioGroupcheck事件