TabSheet: how to re-select previous selected tab?

Hi all,

Is there anyway to keep a tab selected. If user click away into another, it will just switch it back to previous tab immediately.

At the moment, I implement selectedTabChange() as below:

      public void selectedTabChange(SelectedTabChangeEvent event) {
            if (canSwitchTab)

            TabSheet tabsheet = event.getTabSheet();

The tab itself is working but its component got hidden away until the browser is refreshed.

Could anyone please point the way?


This seem like a situation we haven’t thought of when creating the client-side version of the tabsheet. A requestRepaint call on the tabsheet
fix it, but I’m not promising.

If the repaint request fails, please create a new ticket about the issue at
Vaadin Trac

Thanks Jouni,

RequestRepaint is automatically called by setSelectedTab(). I also tried requestRepaintAll() but no luck.

Waiting for it to be fixed might take a while. I will be extending the tab for now.


PS: I can seem to be able to log into the trac system. Does it require another username/password?

I guess it does. There’s the Register button up to the right.

I created
Ticket 3199
for this and commited a fix.

Lovely, thanks Artur.

Can’t wait to check it out.