PDA

View Full Version : Force Reload of autoLoad page (TabView)



fsa3
4 Sep 2009, 6:23 AM
I have a tab in a tabgroup that uses autoLoad to load it's content:



{
title: 'External Accounts',
iconCls: 'x-icon-tickets',
tabTip: 'See Your External Account Links',
style: 'padding: 10px;',
autoLoad: {
url:'/A_LinkedAccounts.jsp',scripts:true}
}
}


What I want is that the page is reloaded from the server EACH time the tab is clicked not just the first time. What is the best way to do that?

Thanks.

Condor
4 Sep 2009, 6:34 AM
Ext.getCmp('id-of-this-panel').doAutoLoad();
or

Ext.getCmp('id-of-this-panel').body.load({
url:'/A_LinkedAccounts.jsp',
scripts:true
});

fsa3
4 Sep 2009, 6:53 AM
Just to be sure,

That could would go in the activate event for the tab?

Condor
4 Sep 2009, 7:00 AM
In that case I would remove the autoLoad config option and add my second example to the activate event.

(otherwise the first time the panel is shown it's loaded twice, once by the autoLoad and once by the activate event)