Adding row category support to a data table
When you add support for row category to a data table, you can group specified rows by a category. The user can then expand or collapse categorized rows by clicking a twistie. For example, if you have a data table containing a row for each employee in a company, you can categorize the rows by employee location. If you then categorize all the employees in Paris, the data table displays with a twistie in the first column of the table. If you expand the twistie, all the rows representing the employees in Paris expand to display the data. When the user clicks the twistie again, all the Paris employee rows in the data table collapse.
To add row category support in your data table:
- Select the data table. The Properties view for the data table opens.
- On the Display options tab of the Properties view for the data table, click Add column to categorize table views. A row category column containing a twistie is added to the data table.
- Select the twistie icon in the Row Category column. (Make sure you do not accidentally select the column header or the column.) The Row Category Properties view (panelRowCateogry) opens.
- Enter a value in the Value field or click the Browse button to select a column in a data source.
Note: Make sure that the table is already sorted by the data you are using for categorization (for example, make sure it is sorted in a DB2 table).
- Optionally, you can specify icons other than the twistie for expand and collapse.
- By default, the text next to the twistie is the value of the column you chose to use for categorization; however, you can provide your own text or combine the value of the column with your own text. If you want to customize the text used to display the categories, enter text next to Output value or click the button next to this field to search for a value.
Related concepts
JavaServer Faces
Data table components
Related tasks
Creating Faces applications - overview
Adding a data table
Associating row actions with a data table
Enabling row selection for a data table
Adding row edit to a data table
parameter from one Faces JSP page to another. Several Faces components, such as command buttons or command hyperlinks, can help you do this">Passing parameters with a data table
footer. A header is displayed along the top of the data table and a footer along the bottom of the data table. You can drag other Faces components to the header and footer. For example, if you want a title for the table and an image next to the title, you can drag an Output component and an Image component to the header.">Adding a header and footer to a data table
Passing parameters between JSP files
Creating navigation for Faces JSP files
Related reference
Faces components reference
Faces attributes reference