2012-10-15 51 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 
     }