2
我知道如何捕捉控制器中的「常規」事件,就像在監聽器中定義的那樣,但我不知道如何捕獲itemclick事件,這有點不同。如果我沒有使用控制器,我會做它像這樣:如何在控制器中捕獲組合框itemclick事件
xtype: 'combobox',
...,
itemId: 'some_id',
listConfig: {
listeners:{
'itemclick':{
fn: function(view, node) {
... do something
}
}
}
}
但我怎麼能捕捉到控制器此事件:
...
init:function(){
this.control({
... how ???
我嘗試這樣做:
this.control({
'[itemId=some_id]':{
itemclick: this.doSomething
},
...
,它不起作用。所以,我想,這個事件有一些特殊之處。