Sencha touch 调用无线电场检查上的事件
我正在创建一个无线电场,我需要在检查无线电场时创建一个事件 我使用的代码是:Sencha touch 调用无线电场检查上的事件,sencha-touch,extjs,sencha-touch-2,radio,Sencha Touch,Extjs,Sencha Touch 2,Radio,我正在创建一个无线电场,我需要在检查无线电场时创建一个事件 我使用的代码是: items : [ { xtype : 'toolbar', docked : 'top', //id:'popupTitle', title : 'Send options', height : 30 }, { xtype : 'radiofield',
items : [ {
xtype : 'toolbar',
docked : 'top',
//id:'popupTitle',
title : 'Send options',
height : 30
}, {
xtype : 'radiofield',
// ui:'plain',
id : 'r1',
name : 'sendDoc',
value : 'Default',
label : 'Default',
labelWidth : '50%',
checked : true,
//baseCls: 'x-plain',
listeners : {
check : function() {
var rad = Ext.getCmp('r1');
if (rad.isChecked()) {
}
}
}
},
{
xtype : 'radiofield',
name : 'sendDoc',
id : 'r2',
value : 'Source Workstep',
label : 'Source Workstep',
labelWidth : '50%',
listeners : {
check : function() {
var rad2 = Ext.getCmp('r2');
if (rad2.isChecked()) {
//alert("hi");
if (!this.workstepOverlay) {
this.workstepOverlay = Ext.Viewport.add({
xtype : 'workstepOverlay'
});
this.workstepOverlay.show();
}
}
}
}
} ]
但这似乎不起作用
我得到一个错误,上面写着“请求的值的键不是对象”
我做错了什么?如果事件被触发,请尝试这样访问您的无线电场:
check( radiofield, event, opts ){
if(radiofield.isChecked()){
}
}
希望这有帮助如果事件被触发,请尝试这样访问您的无线电场:
check( radiofield, event, opts ){
if(radiofield.isChecked()){
}
}
希望这有助于收听活动
选中复选框时激发
倾听事件
选中复选框时激发
您能否告诉我们是否触发了事件(请尝试侦听器中的console.log(“foo”))是..触发了事件。当我被放置在侦听器中时,我确实收到了一个警报。您能告诉我们事件是否被触发(请在侦听器中尝试一个console.log(“foo”))是..事件被触发。当我被放置在监听器中时,我确实收到了一个警报。