View Full Version : Tabpanel work properly only first time. Help!!

ivan r
29 Apr 2011, 12:44 AM
Hi everybody!!!

I'm a newbie and i have a problem with a TabPanel.

In my Tabpanel there are different panels, grids and forms.
I try to describe the structure:

|_________ centerpanel (card layout)___entriesmaipanel__ #grid & forms (cardlayout)
#1 grid
#2 grid

As you can see in the printscreen in attachement, i'd like click (rowclick) in a grid on the left side of the panel to display two forms and one grid in the right side of the panel contained in the tab.
Everything works properly the first time, i can change tab and i have no problem.

If i go back to the first tab, grid and forms are not displayed.
Rowclick on the left side grid and nothing change.
Even the second tab works no me.

Please, could someone tells me why i have this problem?

Thanks in advance

29 Apr 2011, 6:47 AM
I'm guessing that it's a layout problem. Can you provide a pared-down, functional code sample?

ivan r
29 Apr 2011, 7:44 AM
Thanks a lot Friend!!!

In attachement the code sample.
I tried to limit the code to the necessary :)

29 Apr 2011, 10:05 AM
On your 'refresh' method, I noticed that you issue a 'this.removeall()', then rebuild all of a tab's content. After rebuilding, I don't see a call to 'this.doLayout()'. Give that a try and see what you get.

On a design related note, it seems like a lot of work to remove/readd all component on a tab during a refresh; couldn't you just tell the individual components to reload themselves?

ivan r
10 May 2011, 2:11 AM
Hi Friend!

I tried what you suggested me, unfortunately it doesn't solve the problem.

Searching a solutions I probably found the cause of this curious bug.
Infact passing from the TabA to the TabB, TabB become active and my grids and forms are displayed clicking on the panel on the left. Going back to the TabA the active tab remain the TabB, clicking on the left panel grid I can change the cards of the layout contained in the 'entriesmainpanel' but these are displayed in the TAbB instead the TabA.

It means.... everytime I change Tab I have to activate the Tab I am clicking on?

please help me, i'm becoming fool!!

6 Aug 2012, 5:23 AM
I am facing the same issue.

7 Aug 2012, 12:30 PM
Do you have any working example on http://jsfiddle.net/ we can see? Cheers