O'Reilly logo

PrimeFaces Cookbook by Mert Çalışkan, Oleg Varaksin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Usable features of inputTextArea

inputTextArea is an extension to the HTML <textarea> component with special capabilities such as auto-growing, auto-resizing, and remaining-character count.

How to do it...

A basic definition for the input text area would be as follows:

<p:inputTextarea value="#{inputTextAreaController.value}" />

This will render an input text area with default value rows='3' and cols='20' as shown in the following screenshot:

How to do it...

The component also provides auto-resizing with the autoResize attribute that allows us to expand the height automatically when the text input overflows. The default value is false.

<p:inputTextarea value="#{inputTextAreaController.value}" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required