2012-10-15 52 views
0

我有一些工具栏我EXTS 4窗口工具栏在extjs4

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' 
         }] 
        } 
       } 
      ] 
     }; 

从控制器我可能会导致行动delFilter这样

'ns-main-win > toolbar button[action=delFilter]': { 
       click: this.delFilter 
      }, 

从菜单如何淡然行动项目?

+0

你能否解释一下你的问题搜索.... –

回答

0

我不知道你的意思,你要触发delFilter行动?

Ext.getCmp('btnClearFilter').click() 
+0

我想在这样的controller'ns,主胜>工具栏菜单>菜单项>按钮[动作=出口]':{ 点击:this.export }, – user1600070

0

您是否尝试过给菜单项的ID,然后使用该

'#export'{ 
     click:this.export 
     }