I have a tree panel and I would like to associate an action to the click on a leaf of this tree. I managed to associate one to each click on the tree elements but I not only to the leaves.
Here my code, I tried it with very simple functions : (menu is a view extending tree.Panel)
Ext.define('WSR.controller.MenuControl', {
extend: 'Ext.app.Controller',
views: [
'Menu',
'Browser'
],
stores: [ 'UserStore' ],
init: function() {
this.control({
'menu': {
itemclick: this.onItemClicked
}
});
},
onItemClicked: function() {
console.log('ItemClicked');
}
});
Is there somebody to help me please ?
Try:
});
HTH!