PDA

View Full Version : ContentPanel : don't reload the content ?



mediastart
27 Apr 2007, 7:26 AM
Hi all,

I have in a BorderLayout two content panel in the "center". I get the Element of one of them and I load a php file. This php file load a swf. that working well.

Because I have two contentpanels, I have two tabs in order to navigate.
I want when I click in the other tabs and go back to the first ( with the swf ) that the content d'ont be reload because my swf is reloaded too, and I d'ont want that. It's possible don"t refresh the content of a contentpanel ?
If I understand, when a contentPanel is activated, automatically the content of it it's refresh.
Is it possible to desactivate this comportement ?

Thank you.

dfenwick
27 Apr 2007, 8:11 AM
Hi all,

I have in a BorderLayout two content panel in the "center". I get the Element of one of them and I load a php file. This php file load a swf. that working well.

Because I have two contentpanels, I have two tabs in order to navigate.
I want when I click in the other tabs and go back to the first ( with the swf ) that the content d'ont be reload because my swf is reloaded too, and I d'ont want that. It's possible don"t refresh the content of a contentpanel ?
If I understand, when a contentPanel is activated, automatically the content of it it's refresh.
Is it possible to desactivate this comportement ?

Thank you.

It should not be reloading your content when you switch panels. Are you using iframes in your ContentPanels? There are definitely issues with iframe objects when they're shown and hidden.

tpattison
27 Apr 2007, 9:08 AM
Are you specifying 'loadOnce:true' for your specific tab in the content panel?

If so, how about posting your code for everyone to see. It makes assistance a lot easier.


Tim

mediastart
1 May 2007, 10:16 PM
Hi,

I added loadOnce in my code but the problem is'nt fixed.

A part of my code :



var Upload = layout.add('center', new Ext.ContentPanel('Upload', {
title : 'Upload',
fitToFrame : false,
autoScroll : true,
autoCreate : true,
loadOnce : true,
url : 'modules/public/menu_librairie/manage_upload/librairie_upload.php'
}));



"layout" is a border layout.