h:inputTextarea

HtmlInputTextarea is a UIInput component that renders a field for editing multi-line text.

Size Usage

The size of the rendered textarea can be specified via the rows and cols attributes, or via CSS using the styleClass or style attributes.


Source Code

<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:form>
		<h:inputTextarea id="textarea" cols="50" rows="6" value="#{inputTextModelBean.text}" />
		<hr />
		<h:commandButton action="#{inputTextBackingBean.submit}" value="#{i18n['submit']}">
			<f:ajax execute="@form" render="@form" />
		</h:commandButton>
		<h:outputText id="modelValue" value="#{inputTextModelBean.text}" />
	</h:form>

	<h:form>
		<h:inputTextarea id="textarea" value="#{inputTextModelBean.text}"
			style="width: 150px; height: 150px;" />
		<hr />
		<h:commandButton action="#{inputTextBackingBean.submit}" value="#{i18n['submit']}">
			<f:ajax execute="@form" render="@form" />
		</h:commandButton>
		<h:outputText id="modelValue" value="#{inputTextModelBean.text}" />
	</h:form>

</ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20