Javascript extjs4中的工具栏
我的exts4窗口中有一些工具栏Javascript extjs4中的工具栏,javascript,extjs,extjs4,Javascript,Extjs,Extjs4,我的exts4窗口中有一些工具栏 this.tbar = { xtype: 'toolbar', items: [ { id: "btnClearFilter", itemId: "btnClearFilter", action: 'delFilter',
this.tbar = {
xtype: 'toolbar',
items: [
{
id: "btnClearFilter",
itemId: "btnClearFilter",
action: 'delFilter',
disabled: true,
handler: function (btn, e) {
btn.setDisabled(true);
}
},
'-',
{
text: 'Export',
tooltip: 'Export',
disabled: false,
menu : {
items: [{
text: 'Export 1'
, icon: 'Content/Resources/images/Excel-16.png'
, action: 'export'
}]
}
}
]
};
从控制器我可以引起这样的动作
'ns-main-win > toolbar button[action=delFilter]': {
click: this.delFilter
},
如何从菜单项触发操作?我不知道你的意思,你想在delFilter上触发操作吗
Ext.getCmp('btnClearFilter').click()
您是否尝试过给菜单项一个id,然后使用该id进行搜索
'#export'{
click:this.export
}
你能详细说明你的问题吗……我想在控制器的“ns-main-win>工具栏菜单>菜单项>按钮[action=export]”中使用类似的内容:{click:this.export},