How to use JSF label F:facet

Source: Internet
Author: User

The F:facet label is used to declare a special relationship between the parent component that contains the F:facet label and the subcomponents contained by the F:facet label. Often used with h:panelgrid,h:datatable and other labels, stating that the component is a title or footer.
In custom components, we can often use F:facet to add special attributes or processing to a component, such as the paging component provided by Myfaces to make the page-flipping toolbar with F:facet.
F:facet Usage Example: F:facet common usage
<JSF Components >
<f:facet name= "facet name" &GT;...JSF components </f:facet>
&LT;/JSF Components >
When using F:facet in a custom component, you can use the Uicomponent.getfacets (). Get ("Facet name") method to obtain the specified facet component:
(uicomponent) Getfacets (). Get ("facet name");
H:datatable Use F:facet Example:
<f:facet name= "Header" >
</f:facet>
<f:facet name= "Header" >
</f:facet>
Corresponding HTML code:
<table border= "1px" >
<thead>
<tr>
<th>Title</th>
<th>Name</th>
</tr>
</thead>

<tbody>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
</tbody>
</table>

Browser display:
Title Name Hello World

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.