JSF Showcase

h:outputText

HtmlOutputText is a UIOutput component that renders its own value as text.

General Usage

The value attribute can be bound to a model bean property via EL.
This is text from a model bean property.

Source Code

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

	<h:form>
		<h:outputText  value="#{outputTextModelBean.text}" />
	</h:form>

</ui:composition>
@ManagedBean
@RequestScoped
public class OutputTextModelBean {

	public String getText() {
		return "This is text from a model bean property.";
	}

	public Date getToday() {
		return GregorianCalendar.getInstance().getTime();
	}
}
Liferay Faces Bridge Implementation 4.0.0 + Showcase Common 3.0.0 + Liferay Faces Util 3.0.1-SNAPSHOT + Mojarra 2.2.13