(Quick Reference)

tab

Purpose

Configures a single tab of the parent Vaadin TabSheet component.

Examples

<v:tabs>
  <v:tab caption="One">
    <h1>My First Tab</h1>
  </v:tab>
  <v:tab caption="Two" selected="true">
    <div><v:label>My second tab</v:label></div>
  </v:tab>
  <v:tab caption="Three">
    <v:include controller="book" action="list"/>
  </v:tab>
</v:tabs>

Description

The TabSheet component is configured using nested tab tags.

Note that the tab tags do not create any Vaadin components, but instead cause Tab instances to be added to the parent TabSheet.

Body

  • Contains the body of the tab, which can be any mixture of tags and HTML.

Attributes

  • caption (optional) The tab caption
  • icon (optional) The tab icon. Can be specified as a Vaadin Resource, or as a String path to the resource within the Vaadin theme dir for the application.
  • selected (optional) If value is not empty or false, this tab will be selected. If multiple

tabs have the selected attribute, the last one of them is selected.

See Vaadin TabSheet.Tab API docs for full list of allowed attributes.