Name
Data/Table
Synopsis
This renderer represents a data component as a table.
Component family: |
javax.faces.Data |
Renderer type: |
javax.faces.Table |
Renders children: |
Yes |
Encode behavior
Renders the component an HTML <table>
element. UIColumn
child components are responsible
for rendering the table columns. The columns can hold any type of
component, including input components and command components.
Both the data table component and its column children may be equipped
with header
and footer
facets.
The table’s header
facet is
rendered as one <th>
element (with a
colspan
attribute set to the number of children)
within a <tr>
element, and column
header
facets are rendered as
<th>
elements within a separate
<tr>
element. A
<thead>
element encloses both header
<tr>
elements. The footer
facets, if any, are rendered in a similar manner, but with
<td>
elements instead of
<th>
and a <tfoot>
element instead of the <thead>
element. CSS
style classes for the header and footer cells can be specified by the
headerClass
and footerClass
attributes.
The table rows are rendered within a <tbody>
element, with a <tr>
element for each row
and a <td>
element for each column child.
The first row to render and how many rows to render can be specified
by the first
and row
attributes, and CSS style classes for the rows and cells can be
specified by the rowClasses
and
columnClasses
attributes.
Decode behavior
None.
Attributes
[bgcolor="color
"] [border="border
"] [cellpadding="padding
"] [cellspacing="spacing ...
Get JavaServer Faces now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.