Package com.vaadin.ui
Interface Table.RowGenerator
-
- All Superinterfaces:
Serializable
- Enclosing class:
- Table
public static interface Table.RowGenerator extends Serializable
Row generators can be used to replace certain items in a table with a generated string. The generator is called each time the table is rendered, which means that new strings can be generated each time. Row generators can be used for e.g. summary rows or grouping of items.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Table.GeneratedRow
generateRow(Table table, Object itemId)
Called for every row that is painted in the Table.
-
-
-
Method Detail
-
generateRow
Table.GeneratedRow generateRow(Table table, Object itemId)
Called for every row that is painted in the Table. Returning a GeneratedRow object will cause the row to be painted based on the contents of the GeneratedRow. A generated row is by default styled similarly to a header or footer row.The GeneratedRow data object contains the text that should be rendered in the row. The itemId in the container thus works only as a placeholder.
If GeneratedRow.setSpanColumns(true) is used, there will be one String spanning all columns (use setText("Spanning text")). Otherwise you can define one String per visible column.
If GeneratedRow.setRenderAsHtml(true) is used, the strings can contain HTML markup, otherwise all strings will be rendered as text (the default).
A "v-table-generated-row" CSS class is added to all generated rows. For custom styling of a generated row you can combine a RowGenerator with a CellStyleGenerator.
- Parameters:
table
- The Table that is being painteditemId
- The itemId for the row- Returns:
- A GeneratedRow describing how the row should be painted or null to paint the row with the contents from the container
-
-