PDA

View Full Version : Applet behavior on hide/show of TabItem



MalcolmDavis
31 Oct 2013, 6:25 AM
I have a Java Applet that I am trying to put into a ContentPanel in a TabItem. In IE the Applet behaves as I would like. That is, it maintains its state as I switch between tab items. However, in FireFox and Chrome, the applet reinitializes each time it goes through a hide/show cycle.

An ExtJs developer I know has suggested that I set autoDelete to false on the panel, but it isn't clear how to do that in GXT2.

I suspect that setting a different HideMode might be the key here, but the documentation is pretty sparse, so I am hoping for some guidance.

I have seen several questions related to this, but no clear answers. My apologies if I have just not found the right search keywords.

MalcolmDavis
31 Oct 2013, 7:04 AM
Calling setHideMode(HideMode.Visibility) on the TabItem does the trick. The applet maintains its state on hide/show at least for IE, FireFox, and Chrome.

Note, if you have nested tabs, all of the TabItems wrapping the applet need to have this set.

MalcolmDavis
31 Oct 2013, 7:13 AM
My appologies, the Enum is of course HideMode.VISIBILITY no HideMode.Visibility as stated above.

MalcolmDavis
18 Nov 2013, 11:48 AM
Well, as I have answered myself in http://www.sencha.com/forum/showthread.php?275072-Applet-behavior-on-hide-show-of-TabItem. There is a problem with using HideMode.VISIBILITY in a tab item. It works okay, for a single tab, but if multiple tabs with HideMode.VISIBILITY set are in a single TabPanel, then only the contents of the first displays correctly. The subsequent tabs display no content when they are selected. So this is really Unanswered again.