ui:insert

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

General Usage



INSERTED TEXT

Source Code

  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
  2.  
  3. <ui:decorate template="template.xhtml">
  4. <ui:define name="insertContent">
  5. <br/><br/>INSERTED TEXT
  6. </ui:define>
  7. </ui:decorate>
  8.  
  9. </ui:composition>
  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  2. xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
  3. xmlns:h="http://xmlns.jcp.org/jsf/html">
  4. <ui:insert name="insertContent">
  5. <h:outputText value="#{i18n['this-text-comes-from-a-template']}"/>
  6. </ui:insert>
  7. </ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20