f:facet

This Facelet makes possible to add a named UIComponent nested to another. This way, developers can freely implement a more complex Facelet component than a simple attribute does.

عام Usage

f:facet is used in UIData (used by some components like h:dataTable) and by h:column. For custom developments, there are some methods available in UIComponentBase for obtaining those.
Customers
الإسم الأول الإسم الأخير Date of Birth البلد
Footer
John Adams نوفمبر ٣٠, ١٧٣٥ United States
Samuel Adams أكتوبر ٢٧, ١٧٢٢ United States
Josiah Bartlett ديسمبر ٢١, ١٧٢٩ United States
Carter Braxton أكتوبر ١٦, ١٧٣٦ United States
Charles Carroll أكتوبر ١٩, ١٧٣٧ United States
Benjamin Franklin فبراير ١٧, ١٧٠٦ United States
Elbridge Gerry مارس ٠٣, ١٧٠١ United States
John Hancock فبراير ٢٣, ١٧٣٧ United States
Thomas Jefferson مايو ١٣, ١٧٤٣ United States
Francis Lewis أبريل ٢١, ١٧١٣ United States

رمز المصدر

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

	<h:dataTable rows="10"
	value="#{dataTableBacking.customerDataModel}" var="customer">
		<f:facet name="header">
			<h:outputText value="#{i18n['customers']}" />
		</f:facet>
		<h:column>
			<f:facet name="header">
				<h:outputText value="#{i18n['first-name']}"/>
			</f:facet>						
			<h:outputText value="#{customer.firstName}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="#{i18n['last-name']}"/>
			</f:facet>
			<h:outputText value="#{customer.lastName}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="#{i18n['date-of-birth']}"/>
			</f:facet>
			<h:outputText value="#{customer.dateOfBirth}">
				<f:convertDateTime pattern="MMM dd, yyyy" />
			</h:outputText>
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="#{i18n['country']}"/>
			</f:facet>
			<h:outputText value="#{customer.country.countryName}"/>
		</h:column>
		<f:facet name="footer">
			<h:outputText value="#{i18n['footer']}" />
		</f:facet>
	</h:dataTable>
</ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Liferay Faces Portal 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20