Home » JSF h:inputTextarea

JSF h:inputTextarea

by Online Tutorials Library

JSF <h:inputTextarea> Tag

JSF renders this as an HTML “textarea” element. It allows a user to enter multiline string.

Example

JSF renders <h:inputTextarea> tag as below:

Output:

JSF H inputtextarea tag 1

Attribute

Attribute Description
id It is an identifier for this component. This id must be unique. You can use it to access HTML element in CSS and JS file.
value It holds current value of this component.
cols It is used to set number of cols for the textarea.
rows It is used to set number of rows for the textarea.
required It indicates that the user is required to provide a submitted value for this input component.
requiredMessage If required attribute is set to true, the message description provided in the requiredMessage is display to the web page.
disabled It is used to disabled component. You can disabled it by assigning true value.
onclick It is method which invokes JavaScript code after onclick on the textarea.
onselect It is a method which invokes JavaScript code when a user select this component.
readonly It indicates that this component prohibits changes by the user. You can make component readonly by passing readonly as a value of this attribute. eg. readonly = “readonly”
rendered It is used to render this component. You can set it’s value true or false. Default value is true.
label It is used to set a localized name for this component.
lang It is used to set language for this component.
style It is used to set CSS style code to provide better user interface of this component.
accesskey Access key that, when pressed, transfers focus to this element. It varies browser to browser.

You may also like