JBoss.orgCommunity Documentation

Chapter 8. Tables and grids

8.1. <rich:column>
8.2. <rich:columnGroup>
8.3. <rich:dataScroller>
8.4. <rich:dataTable>
8.5. <rich:extendedDataTable>
8.6. <rich:subTable>
8.7. Table filtering
8.8. Table sorting

This chapter covers all components related to the display of tables and grids.

The <rich:column> component facilitates columns in a table or other UIData component. It supports merging columns and rows, sorting, filtering, and customized skinning.

In general usage, the <rich:column> component is used in the same was as the JavaServer Faces (JSF) <h:column> component. It requires no extra attributes for basic usage, as shown in Example 8.1, “Basic column example”.


Figure 8.1. Basic column example


Columns can be merged by using the colspan attribute to specify how many normal columns to span. The colspan attribute is used in conjunction with the breakBefore attribute on the next column to determine how the merged columns are laid out. Example 8.2, “Column spanning example”.


Figure 8.2. Column spanning example


Similarly, the rowspan attribute can be used to merge and span rows. Again the breakBefore attribute needs to be used on related <rich:column> components to define the layout. Example 8.3, “Row spanning example” and the resulting Figure 8.4, “Complex headers using column groups” show the first column of the table spanning three rows.


Figure 8.3. Row spanning example


For details on filtering and sorting columns, refer to Section 8.7, “Table filtering” and Section 8.8, “Table sorting”.

The <rich:columnGroup> component combines multiple columns in a single row to organize complex parts of a table. The resulting effect is similar to using the breakBefore attribute of the <rich:column> component, but is clearer and easier to follow in the source code.

The <rich:columnGroup> can also be used to create complex headers in a table. Example 8.4, “Complex headers using column groups” and the resulting Figure 8.4, “Complex headers using column groups” demonstrate how complex headers can be achieved.


Figure 8.4. Complex headers using column groups


Incomplete

Incomplete

* Combined with rich:scrollableDataTable

Incomplete

Incomplete

Incomplete