PDA

View Full Version : TabPanel reload data when active tab



Nheil
24 Mar 2011, 3:13 AM
Hi everyone,

i am looking for a function that if you click on a tab, every store in the tab are reload.




tabPanel = new Ext.TabPanel({
id: 'tabPanelRecherche',
width: 812,
height: 850,
activeTab: 0,
enableTabScroll:true,
renderTo: document.getElementById('recherche'),
defaults: {autoScroll:true},
items: [{
id: 'tabResultat',
iconCls: 'boussole',
title: 'Ticket en cours',
style: 'padding: 5px;',
items:
[
pnlFiltre,
pnlResultat,
pnlLegende
]
}
],
autoScroll:true
});



I supposed that a public action exist, but i cant find it

leowyatt
24 Mar 2011, 3:44 AM
Can you not add a listener to the tab for a click or show action?

Then just reload all the stores?

kohyea
25 Mar 2011, 7:15 PM
you can reload the stores on the event 'tabchange',



tabPanel.on('tabchange', function(tab, item){
//reload the stores here
})

Nheil
28 Mar 2011, 1:09 AM
thx i used tabchange