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.

  1. To add columns to a data table:

    1. Select the data table.

    2. 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.

    3. 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.

    4. 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, Link - Command, or Image component) from the palette to the column and bind them to data sources, such as relational record lists.)

  2. To delete columns:

    1. Select the data table.

    2. In the Properties view for the data table, select a column in the columns table and click

      Remove.

    3. An alternate way to delete a column it to select the column in the data table and click

      Delete.

  3. To change the location of columns:

    1. Select the data table.

    2. In the Properties view for the data table, select a column in the columns table.

    3. Click

      Move Up or

      Move Down to change the location of the selected column.

  4. To arrange multiple components in a column:

    1. Drag components such as Input, Output, or Button - Command components from the palette to the column.

    2. In the Properties views for the new components, enter values or bind them to records.

    3. 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