Element html.table.Table

Substitution Groups:
html.IView

A graphical component that displays data in a tabular format.

It has the following features:

Note: in a paginated table, if the total count of elements is not returned by the application, the table adapts its rendering and behavior to handle this situation.

For large amounts of data, it is highly recommended to use pagination. Otherwise, the table rendering might overwhelm server resources, and also the client browser if the resulting page is very large.
Moreover, the Table components provides a simple support for sorting, filtering and paginating raw vector data localy (see attribute SortAndPaginateLocaly). This can be very handy for adding table features with no implementation cost, but it also has limits.
Once again for displaying large amounts of data, it is recommended that you implement yourself those operations (that can perfectly be implemented on the data base side), not to overweight server resources.

Right before rendering itself, the table component gets vector data from the application with the GetData binding, each element of this vector representing a row in the table.
During this invocation, the table makes available its rendering context (class org.ow2.opensuit.xml.base.html.table.RenderingContextBean), that may be accessed by application code and by table child components.
This context is a request Bean with name '$context', and has the following attributes:

Then during the rendering of its rows, the table keeps available the object representing the current row as a request attribute with name '$row'.
Its attributes may be accessed as any standard Bean.


Attributes
mandatory   String ID The component ID. Must be unique in its page.
optional   String CssClass The CSS class to apply.
Default: 'osuit-Table'.
optional   boolean SortAndPaginateLocaly Determines whether the Table component should handle pagination, sorting and filtering.
Default: false.
optional   String RowBeanName The name of the row contextual bean.
This bean is available at render-time only, and represents the current row that is being rendered.
Default: $row.
optional   enums.TableStyle Style Defines the table rendering style (either table or paragraphs).
Default: table.

Named Children Elements
optional   binding.Expression Title Defines the displayed Table title.
Default: none.
optional   binding.Expression ResultsPerPage Declares the binding to get the number of results to display per page.
If not set, the table displays all rows in the same page.Otherwise, the table truncates data into pages, and shows links to help navigation (previous, next, page accessors, ...).
mandatory   binding.Expression RowsData Expression that returns a vector of objects repesenting the table rows.
optional   binding.Expression BottomRow Expression that returns an object represneting the table bottom row.
The bottom row is always visible (whatever the pagination).
It is used for example to implement total sum(s) in a spreadsheet.
The expression type must be compatible with 'RowsData' elementary type.
optional   html.table.SelectionBindings Selection Setups rows selection.
0 - unbounded   html.IView[] DetailsView Allows to design a detailled view (HTML components) for each row.
When defined, the Table component displays a collapse/expand button in front of each row.
Warning: Use this feature with extreme care. For now, only the ViewForm component may be used to design the details view.
0 - unbounded   html.menu.IMenuItem[] Toolbar Defines toolbar buttons displayed by the table.
Those buttons may perform multiple actions on table rows (based on selection for instance).
1 - unbounded   html.table.IColumnsProvider[] Columns The list of Columns displayed by the Table.
Supported contextual beans: $row