日期:2014-05-16  浏览次数:20334 次

extjs 树的右键事件和点击事件之间的关联
//itemcontextmenu( Ext.view.View this, Ext.data.Model record, HTMLElement item, Number index, Ext.EventObject e, Object options )
Ext.getCmp('treepanelid').on('itemcontextmenu',function(view,node,item,index,e){
click(view,node);
alert(node.data.text+" ++  itemcontextmenu");
});

//itemclick( Ext.view.View this, Ext.data.Model record, HTMLElement item, Number index, Ext.EventObject e, Object options )
Ext.getCmp('treepanelid').on('itemclick',function(view,node){
click(view,node);
});
click  = function(view,node){
alert(node.data.text+" :node click");
}