Name

Panel/Grid

Synopsis

This renderer represents a panel component as a table.

Component family:

javax.faces.Panel

Renderer type:

javax.faces.Grid

Renders children:

Yes

Encode behavior

Renders the component as an HTML table with the number of columns specified by the columns attribute. The renderer uses the component’s children to render the table cells, with new rows as the number of columns is reached.

The panel component may be equipped with a header and a footer facet. The table’s header facet is rendered as one <th> element (with a colspan attribute set to the value of the columns attribute) within a <tr> element, enclosed within an <thead> element. The footer facet is rendered in a similar manner, but with a <td> element 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. 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"] [columnClasses="styleClasses"]
[columns="noOfColumns"] [dir="ltr|rtl"] [footerClass="styleClass"]
[frame="frame"] [headerClass="styleClass"] [lang="lang"]
[onclick="code"] [ondblclick="code"] [onkeydown="code"]
[onkeypress="code"] [onkeyup=" ...

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.