Bug: TabSheet style is lost when switching visibility state

Hi all,

I recently stumbled across this problem, which I think is indeed a bug.

I’ve got an application that includes a TabSheet, which I show or hide depending on what the user is doing. I initially set the style of the TabSheet to Reindeer.TABSHEET_MINIMAL. It seems that hiding the TabSheet removes the style, so that on the next time it is shown, the style resets to the default one.

Here’s a small application that illustrates this issue (source file attached):


The ‘switch’ button changes the visibility state of the TabSheet. The second time the TabSheet is shown, the style has changed unexpectedly.

Now the real issue is that I’m unable to set again the style to Reindeer.TABSHEET_MINIMAL: Calling setStyleName() after setVisible() has no effect.

So is this a bug or am I doing something wrong? And if that’s a bug, how can I work around it?
11707.java (1.1 KB)

Looks like a bug - if you can reproduce this with a more recent version of Vaadin, please
file a ticket
with the attached test case.

Definitely a bug. VTabsheet seems to forget to add the “minimal” postfix to the “.v-tabsheet-tabs” element, hence making the tabs look different.