PDA

View Full Version : TabPanel inside Window manipulation



olivier.aime
14 Aug 2011, 11:59 AM
Hello. Could you help me to understand how to do this :

Description : i have a 2 tabs TabPanel inside a Window component. This window is shown each time a row of a Grid is selected.
I need to update the tabcontent refresh each time I show this window.

I have a script that do almost all that i want, but the problem is that content is reloaded only if i Click on tab (tabchange), that is different from the currently active one.
How can i trigger the reload when the "win.show()" is trigerred by the click on grid item ?

Here is my code

Thanks you very much

if(!win){
win = new Ext.Window({
applyTo:'hello-win',
layout:'fit',
width:550,
height:350,
modal:true,
draggable:false,
closeAction:'hide',
plain: false,


items: new Ext.TabPanel({
items:[{
title: 'General',
autoLoad:{url: 'iframe.php?param1='+menuMonth.getValue(), scripts:true}
},{
title: 'Statistics',
autoLoad:{url: 'iframe.php?param1='+menuMonth.getValue(), scripts:true}
}
],
listeners: {
tabchange: function(tabPanel,newTab){
var thisObj = newTab.getUpdater();
if(thisObj) thisObj.update({url: 'iframe.php?param1='+menuMonth.getValue()});
}
},
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
}),


buttons: [{
text:'Submit',
disabled:true
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
}
win.show(this);
win.setTitle('Customer '+rowIdx);