I am really puzzled about Vaadin's Tabs/Tab-component:
I have created a page with a couple of tabs essentially like this:
Tabs tabs = new Tabs();
Tab tab1 = new Tab("Label 1");
tab1.add(<some components (labels and entry fields) here>);
tabs.add(tab1);
Tab tab2 = new Tab("Label 2");
tab2.add(<some components (labels and entry fields) here>);
tabs.add(tab2);
Tab tab3 = new Tab("Label 3");
tab3.add(<some components (labels and entry fields) here>);
tabs.add(tab3);
mainPage.add(tabs)
What I would have expected to get rendered is something similar to this (modulo some styling of course):
___________ ___________ ___________
/ Label 1 \/ *Label 2* \/ Label 3 \
+----------------------------------------------------+
| Content of Tab 2 visible |
| |
| (the other tabs' contents is hidden until their |
| corresponding tab is selected ) |
| |
| |
+----------------------------------------------------+
I.e. I have a list of titles marking individual tabs or "pages", only ONE of which has its content displayed underneath. Here, e.g. assume that tab 2 is currently selected, hence in the area below I can see its contents, while the contents of tab 1 and tab 3 are currently hidden.
Now, the Vaadin Tabs are displayed like this:
[content 1] [content 2] [content 3]
Label 1 [content 1] *Label 2* [content 2] Label 3 [content 3]
[content 1] [content 2] [content 3]
[content 1] [content 2] [content 3]
-----
I.e. each tab's contents is shown next to the corresponding label and ALL contents are visible at the same time. The line indicates the currently selected tab.
This is the most bizarre implementation of the Tab concept and looks totally broken to me! Is this really intended to display like this? Or am I doing something wrong here?