Using Facets
Some component types use
facets. A
facet is different from a regular child
component in that it has a special purpose, specified by its name,
but any component type can be used as a facet. In a JSP page, a facet
is represented by the
<f:facet> element. The
<h:column> action supports two facets:
header and footer. The
<h:dataTable> action renders the
header facet as a column header and, as
you’ve probably guessed, it renders the
footer facet as a column footer. You can specify
header and footer facets for
the table itself using <f:facet> elements as
direct children of the <h:dataTable>
element. It renders the table header and footer as rows with a single
column spanning the whole table before and after the real table data.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access