I am developing an application with extjs4 and c#, it is based on the browser-layout example.
I have a menu on the left side, where you can click each item of that menu. On the right side I have all of my tabs.
The event listener I’m using on the tabs works when I click on the tab, but doesn’t work after the first time I click on it from the left menu.
To be clearer, when I first load my application, I have to select an item from left menu, it then shows my tab with tab1 activated. Everything works well, except it doesn’t work when I select another item then go back to my tab.
This is my listener:
listeners: { activate: function () {
alert('tab1');
}
},
Here is the code called when clicking the menu:
menuPanel.getSelectionModel().on('select', function (selModel, record) {
if (record.get('leaf')) {
Ext.getCmp('content-panel').layout.setActiveItem(record.getId() + '-panel');
Ext.getCmp('cardTabs').setActiveTab(0);
}}
Thanks in advance!
Solved
I added a listener to my tabpanel