Adding a Data Grid
The Data Grid allows users to sort, filter, manipulate, and page through data. You bind the Data Grid to a Client Data object and define properties to determine how each column, row, and cell performs. For example, you may want to display the employees in a department. In this scenario, your Page Data Object and Client Data Object return a list of employees.
Use the following steps to put a Data Grid on a JSP page.
- In the Web perspective, open your JSP page and the Faces Client Components drawer from the palette.
- Drag theData Grid control onto the JSP page.
- From the Client Data view, select and drag a list property to the Data Grid component. This step binds the Client Data to the Data Grid
- Select the Data Grid component on the JSP page.
- Go to the Properties view.
- On the odc:datagrid tab, set the number of rows to display per page, specify if rows can be added or deleted, specify a style, and specify if the header and footer navigation bars are shown.
- On the Columns tab, specify which columns to display, such as first name, last name, phone, or salary, the width of the column, and a column label.
- On the Column details tab, specify how the data in a column is formatted, for example, number, date, string.
- Save and run the JSP page on a test server when you have finished
Note: For more information on the Data Grid, press the F1 key in the Properties view.