h:dataTable attributes are listed in Table 5-1. Table 5-1. Attributes for h:dataTableAttribute | Description |
---|
bgcolor | Background color for the table | border | Width of the table's border | cellpadding | Padding around table cells | cellspacing | Spacing between table cells | columnClasses | Comma-separated list of CSS classes for columns | first | Index of the first row shown in the table | footerClass | CSS class for the table footer | frame | Specification for sides of the frame surrounding the table should be drawn; valid values: none, above, below, hsides, vsides, lhs, rhs, box, border | headerClass | CSS class for the table header | rowClasses | Comma-separated list of CSS classes for columns | rules | Specification for lines drawn between cells; valid values: groups, rows, columns, all | summary | Summary of the table's purpose and structure used for non-visual feedback such as speech | var | The name of the variable created by the data table that represents the current item in the value | binding, id, rendered, styleClass, value | Basic attributes | dir, lang, style, title, width | HTML 4.0 | onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup | DHTML events |
The binding, id, and rendered attributes are discussed in Chapter 4. h:dataTable also comes with a full complement of DHTML event and HTML 4.0 pass-through attributes. You can read more about those attributes in Chapter 4. The first attribute specifies the index of the first visible row in the table. The value attribute points to the data over which h:dataTable iterates. At the start of each iteration, h:dataTable creates a request-scoped variable that you name with h:dataTable's var attribute. Within the body of the h:dataTable tag you can reference the current item with that name. |