Getting text input with the InputText component
InputText is an extension of the standard JSF <h:inputText>
component with skinning capabilities:
<p:inputText id="emailId" value="#{userController.loginUser.emailId}" required="true"/>
PrimeFaces provides an additional type
attribute for the <p:inputText>
component, which can be used to generate other types of input fields such as the hidden
input text field, which is similar to the standard JSF <h:inputHidden>
component:
<p:inputText id="id" value="#{userController.registerUser.id}" type="hidden" />
Similar to the JSF <h:inputText>
component, PrimeFaces <p:inputText>
supports various JavaScript events such as onclick
, onmouseover
, onfocus
, and so on.