(Quick Reference)

table

Purpose

Adds a Vaadin Table component to the parent container.

Examples

<v:table containerDataSource="${new BeanItemContainer(Book.class, bookInstanceList)}">
  <v:column name="id" generator="${{item->
    v.createLink(action:'show', class:'link',
      id:item.getItemProperty('id'),
      caption:item.getItemProperty('name'))
    }}">Id</v:column>
  <v:column name="title">Title</v:column>
  <v:column name="author">Author</v:column>
</v:table>

Description

The Table component is configured using nested column tags. These are used to set the visibleColumns and columnHeaders properties of the table component.

Body

  • column tags should be specified in the body. Any HTML is ignored.

Attributes

Specific
  • containerDataSource (optional) The Container object to use to provide the underlying table data.

General
  • var (optional) Uses Grails's set tag to set the value of the specified variable to be this component.
  • class (optional) The CSS class name to add to the component using the addStyleName() method
  • sizeUndefined (optional) Calls setSizeUndefined() on the component. (Attribute value is ignored)
  • sizeFull (optional) Calls setSizeFull() on the component. (Attribute value is ignored)
  • location (optional) The location slot in the parent container to which this component should be added.
  • wrapperClass, wrapperStyle (optional) Special styling for wrapper <div>.

See Vaadin Table API docs for full list of allowed attributes.