PDA

View Full Version : Panels within TabPanel



Bleak
15 Oct 2010, 6:23 AM
I have a series of panels, within a TabPanel, however, a couple of the tabs do not render properly unless they are set as the active tab before the tabpanel is rendered.

Is there a way to fix this?

heidtmare
15 Oct 2010, 7:56 AM
what do u mean by dont render properly?
Depending on what your issue is deferredRender:false may be the solution

winklerd
15 Oct 2010, 8:18 AM
I had a similar problem to this. Keep in mind that the body of a tab is not even created until the tab is activated for the first time. So if you're trying to do anything with the body (like tab.update()) it will fail. I was able to get around this by storing the content in a property of the panel object and setting up the render listener to load the content rather than loading it when the panel was created.

podoprigoraisv
16 Oct 2010, 2:04 AM
set in tabpanel deferredRender:false, forceLayout : true

Bleak
16 Oct 2010, 7:35 AM
I've tried all of the various deferredRender: false, forceLayout: true, etc. The issue seems to be if the tab contains a panel that has a layout of 'auto', it doesn't properly render the child components.. If I change the layout to 'fit, things work well.

The reason I want it to be 'auto', is so that the parent panel properly scrolls up/down.. Sorry, I know I'm leaving a lot of information out but the tab panel contains 3 sub-components so posting all the code would be an issue. I'll try and make a simpler example that demonstrates the problem and then we can work from there.