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 the InputText component

Let us see how we can use various features of the <p:inputText> component such as creating text, hidden type input fields, JavaScript event handlers, and so on:

  1. Create a form with input fields of type text and hidden:
    <h:form id="form1"> <p:panel header="InputText Components"> <h:panelGrid columns="2"> <h:outputLabel value="EmailId" /> <p:inputText id="emailId" value="#{userController.registerUser.emailId}" required="true" onclick="$(this).select();"/> <h:outputLabel for="firstName" value="FirstName"/> <p:inputText id="firstName" value="#{userController.registerUser.firstName}" required="true" label="FirstName" onchange="firstNameChanged()" /> <p:inputText id="id" value="#{userController.registerUser.id}" ...

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