Javatpoint Logo
Javatpoint Logo

PrimeFaces InputTextarea

PrimeFaces provides <p:inputTextarea> component to create a text area in JSF application. It is an extension of standard inputTextarea. It includes various features like: autoComplete, autoResize etc.

It also shows remaining characters information.

InputTextarea Attributes

The following table contains attributes for the InputTextarea component.

Attribute Default value Return type Description
id null String It is an unique identifier of the component.
rendered true Boolean It renders boolean value to specify the rendering of the component.
binding null Object It is used to set an el expression that maps to a server side UIComponent instance in a backing bean.
value null Object It is used to hold value of the component.
converter null Converter/String An el expression or a literal text that defines a converter for the component.
immediate false Boolean It is used to set boolean value.
required false Boolean It is used to make a component required.
validator null Method Expr It is a method binding expression that refers to a method validation.
valueChangeListener null Method Expr It is a method binding expression that refers to a method for handling a value change event.
requiredMessage null String It is used to set message to be displayed when required field validation fails.
converterMessage null String It is used to set message to be displayed when conversion fails.
validatorMessage null String It is used to set message to be displayed when validation fields.
autocomplete null String It is used to set autocomplete behavior.
size null Integer It is used to set number of characters that determine the width of the input element.
style null String It is used to set in line CSS for the input element.
autoResize true Boolean It is used to set autoResize true or false.

Example

Here, in the following example, we are implementing <p:inputTextarea> component. This example contains the following files.

JSF File

// inputTextarea.xhtml

ManagedBean

// AutoCompleteTextArea.java

Output:

Primefaces Inputtextarea 1

It shows suggestions while we start typing in the textarea.

Primefaces Inputtextarea 2





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA