Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Tabsheet - Remembering last active tab

Madz R
1 decade ago May 16, 2012 8:19am
E. Yildiz
1 decade ago May 16, 2012 11:49am


if you could save the last active tabsheet caption, you could compare it with the other captions. For example:

String selectedTabSheet = tabSheet.getSelectedTab().getCaption();

after you reload the page you can do something like this:

final Iterator<Component> i = tabSheet.getComponentIterator();
while (i.hasNext())
	final Component c = i.next();
	final Tab tab = tabSheet.getTab(c);
	if (selectedTabSheet.equals(tab.getCaption()))

I dont know if this is the right way but it works.


Last updated on May, 16th 2012
Leif Åstrand
1 decade ago Jun 06, 2012 10:55am