Managing columns in a data table
You can add, delete, or change the location of columns in a data table. In addition, you can arrange multiple components in a single column.
Each column in a data table usually has a column title and a data area. It is the data area of the column that repeats for each record.
- To add columns to a data table:
- Select the data table.
- In the Properties view for the data table, click the Add button. A column is added to the data table and given a default ID and Label.
- Change the label for the new column under Label in the Properties view. The label is the name that appears as the column title and is usually an output text component.
- You can also drag a property from the Page Data view onto the data table. A new column is created on the data table with the appropriate Faces component and is already bound to the data source. (An alternate method is to drag components (such as an Output, Command - Hyperlink, or Image component) from the palette to the column and bind them to data sources, such as relational record lists.)
- To delete columns:
- Select the data table.
- In the Properties view for the data table, select a column in the columns table and click Remove.
- An alternate way to delete a column it to select the column in the data table and click Delete.
- To change the location of columns:
- Select the data table.
- In the Properties view for the data table, select a column in the columns table.
- Click Move Up or Move Down to change the location of the selected column.
- To arrange multiple components in a column:
- Drag components such as Input, Output, or Command - Button components from the palette to the column.
- In the Properties views for the new components, enter values or bind them to records.
- If you are want to drag more than one component into a column, consider dragging a Panel - Group Box component to the column first. Then, you can drag the components to the panel group box and organize them more easily. For example, you can list multiple components on different lines. If you do not use a panel group box, then multiple components are displayed next to each other and the column may appear crowded.
Related concepts
Data table components
Related tasks
Adding 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 a footer to a data table
Adding paging to a data table
Enabling row selection for a data table
Associating row actions with a data table
Adding row category support to a data table
Adding row edit to a data table
Related reference
Faces components reference
Faces attributes reference