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:
Create a form with input fields of type
text
andhidden
:<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}" type="hidden" /> <p:commandButton...