O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

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

Time for action – using InputTextarea

In this section, we will demonstrate how to use the AutoComplete feature with InputTextarea and show how many more characters can be entered into that field, which is shown as follows:

  1. Create the user account form with <p:inputTextarea> to enter the user's biography:
    <h:form id="myAccountForm"> <p:panel header="My Account"> <h:panelGrid columns="2"> <p:outputLabel for="bio" value="About Me"/> <p:inputTextarea id="bio" value="#{userController.loginUser.bio}" cols="50" rows="5" completeMethod="#{userController.completeBio}" minQueryLength="4" scrollHeight="100" counter="counter" counterTemplate="{0} characters remaining" maxlength="500" autoResize="true" /> <h:outputText id="counter" value="" /> <p:commandButton ...

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