PDA

View Full Version : Form control disappears on TabPanel reload



sachindhake
2 Sep 2010, 2:43 AM
Please help me to resolve the issue I am facing related to TabPanel.

I have TabPanel wrapped in FormPanel that I am launching using an Window component. TabPanel has 4 tabs each containing form controls. The window loads and displays all the form controls perfectly at the first time. But when I close and reopen the form window, only form labels are displayed and controls are disappeared.

I tried setting autoDestroy property of TabPanel, FormPanel. Also tried using doLayout() method on 'activate' event of the TabPanel. I have observed using FireBug that the form controls are not rendering at all, its displaying blank DIV elements next to form labels.

What could be the cause. Any help will be appreciated.

Thanks in advance

Condor
2 Sep 2010, 2:52 AM
You either destroy and recreate the window or hide and reshow it, but you are hiding and recreating the window (so you get multiple components with the same id - and you are leaking memory).

sachindhake
2 Sep 2010, 3:00 AM
You either destroy and recreate the window or hide and reshow it, but you are hiding and recreating the window (so you get multiple components with the same id - an you are leaking memory).

Great !!! Just set the value of closeAction property of the Window to true and it worked !

Thank you very much Condor. ExtJs Rocks :)