2
我想问哪儿,我可以添加一个监听到我的网MVC绑定激活事件网格面板Extjs4
当我这样做没有发生:
Ext.define('myApp.view.reslist' ,{
extend: 'Ext.grid.Panel',
alias : 'widget.reslist',
store : 'resStore',
listeners: {
activate: {
fn: function(e){
console.log('reslist panel activated');
}
}
},
dockedItems: [{
xtype: 'pagbar',
store: 'resStore',
dock: 'top',
displayInfo: true
}],
..... rest of grid configs
,并将其与click事件的作品:
listeners: {
activate: {
fn: function(e){
console.log('reslist panel clicked');
}
}
}
注:我的控制器的初始化仍然是空的:
Ext.define('myApp.controller.resControl', {
extend: 'Ext.app.Controller',
stores: ['resStore'],
models: ['resModel'],
views: ['reslist','pagbar'],
init: function() {
// nothing here
}
});
谢谢你abdel这很好,帮助这么多,我知道的活动事件,我使用标签面板 – cranberies 2011-05-22 16:39:18
我之所以要激发事件处理程序的原因,是我想计算我的高度网格,因此它适合边框视口的中心面板,是吗? – cranberies 2011-05-22 16:45:50
@Abdel im intrested在同一个问题,并试图dp你的建议,但它没有工作,没有发生任何想法为什么? – Armance 2011-07-25 16:42:11