h:outputFormat

HtmlOutputFormat is a UIOutput component that renders parameterized text.

General Usage

The value attribute can contain parameterized text in the same manner as MessageFormat and parameter substitution is accomplished via f:param child tags.
First: Alpha, Last: Omega

Source Code

  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
  2. xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
  3.  
  4. <h:form>
  5. <h:outputFormat value="First: {1}, Last: {0}">
  6. <f:param value="Omega" />
  7. <f:param value="Alpha" />
  8. </h:outputFormat>
  9. </h:form>
  10.  
  11. </ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20