ui:insert

ui:insert tag is used for creating a section inside a template that will be used by other pages through ui:define.

Allgemein Usage



INSERTED TEXT

Quellcode

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

	<ui:decorate template="template.xhtml">
		<ui:define name="insertContent">
			<br/><br/>INSERTED TEXT
		</ui:define>
	</ui:decorate>

</ui:composition>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
    
   	<ui:insert name="insertContent">
   		   	<h:outputText value="#{i18n['this-text-comes-from-a-template']}"/>
   	</ui:insert>
</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