View Full Version : tabPanel + closable tab with items

3 Mar 2010, 6:33 AM

Well, I am in troubles with tabPanel.
I created form as variable which is later used in closable tabPanel. When I open tab from menu for the first time everything is perfect. After closing tab and opening again - there is no form in tab field. I suppose variable was erased but how to keep it.
One solution is based on building item every time tab is created. But this requires in this case long code included in tab definition. I would like to divide code into smaller parts.

Is there any solution?


3 Mar 2010, 7:18 AM
here from the api of tabpanel:

Note: By default, a tab's close tool destroys the child tab Component and all its descendants. This makes the child tab Component, and all its descendants unusable. To enable re-use of a tab, configure the TabPanel with autoDestroy: false.

kind regards,

4 Mar 2010, 1:49 AM
Thank you for help.


4 Mar 2010, 3:56 AM

I would be thankful if you could advise what do to in case i've got in tabPanel a formPanel.
autoDestroy: false, does not help but creating item with new formPanel {} in tabs works perfectly. As variable fails again.

Double click on grid's row opens window. Window contains Tab. In one of the tabs there is a formPanel.
While using autoDestroy: false and variable in item, window does not open at all :(