Providing the data
A low level
Table
component that wraps all other low level
Table
components. This component carries the
ITableModel
that is used by the other
Table
components. The information that will be displayed can be provided either via the
source and columns parameters, or via the
tableModel
parameters.
There are many ways to provide the component with the data it has to render, but here are the three major ones:
tableModel
parameter.
Defining the columns
If you define the table columns using the
columns
parameter, you can either provide a list of
ITableColumn
objects, each defining a column in the table, or you can define the columns using a
string that describes each column.
The string describing the columns must be formatted in the following way:
LocaleSelection
component for examples.
ITableColumn
object defining the column.
Here is an example of the use of a description string to define columns:
columns="locale:toString(), =currencyColumn,
verbosity:Verbosity:currentRowVerbosity, !delete"
See also: Table , TableView , TablePages , TableRows , TableValues , TableColumns
Name | Type | Required | Default | Description |
---|---|---|---|---|
source |
Object
[]
Collection Iterator IBasicTableModel |
You must provide either both
source
and
columns
parameters or the
tableModel
parameter
|
The data to be displayed by the component. This parameter must be used in combination with the columns parameter. The parameter must be an array of values, a collection, an iterator, or an object implementing the IBasicTableModel interface. | |
columns |
String
ITableColumnModel ITableColumnModel List Iterator |
The table columns to be displayed. The parameter must be an array, a list, or an Iterator of ITableColumn objects, an ITableColumnModel, or a String describing the columns (see documentation). | ||
tableModel | ITableModel | The ITableModel to be used to render the table. The model contains all of the information needed to render the table and gives greatest flexibility, but it may be harder to implement than simply using the source and columns parameters. | ||
persist | String | literal:session |
Defines how the table state (paging and sorting) will be persisted
if no tableSessionStoreManager is defined.
The possible values are session (the default),
client , client:page ,
and client:app .
|
|
tableSessionStateManager | ITableSessionStateManager | no | A custom session state manager that reloads the data at each request if it is provided via the source and columns parameters or stores all of it in the session if it is provided via the tableModel parameter |
This is the session state manager that will control what part of the
table model will be saved in the session state. It is then used to
recreate the table model by using what was saved in the session.
You can use one of the stock implementations of ITableSessionStateManager to determine the session state behaviour, or you can define your own. |
tableSessionStoreManager | ITableSessionStoreManager | no | Determines how the session state (returned by the session state manager) will be saved in the session. If this parameter is null, then the state will be saved as a persistent property. If it is not null, then the methods of the interface will be used to save and load the state. | |
pageSize | int | no | 10 |
The number of records displayed per page.
This parameter is only used with the source and columns parameters. |
initialSortColumn | String | no |
The id of the column to initially sort the table by. A value of null
indicates no sorting.
This parameter is only used with the source and columns parameters. |
|
initialSortOrder | boolean | no | false |
The order of the initial sorting. Set this parameter to false to sort in
an ascending order and to true to sort in a descending one.
This parameter is only used with the source and columns parameters. |
element | String | no | table | The tag that will be used to wrap the inner components. If no binding is given, the tag that will be generated is 'table'. If you would like to place the bounds of the table elsewhere, you can make the element 'span' or another neutral tag and manually define the table. |
columnSettingsContainer | IComponent |
no | container | The container used to look up Blocks and messages when the source/columns mode is being used. |
Body: removed
Informal parameters: allowed
Reserved parameters: none