Java Reference
In-Depth Information
<h:inputText id="firstName" label="First Name"
required="true"
value="#{registrationBean.firstName}"
/>
<rich:message for="firstName" />
<h:outputLabel value="Last Name:" for="lastName"/>
<h:inputText id="lastName" label="Last Name"
required="true"
value="#{registrationBean.lastName}"
/>
<rich:message for="lastName" />
<h:outputLabel for="age" value="Age:"/>
<rich:inputNumberSpinner id="age" label="age"
value="#{registrationBean.age}"
minValue="0"
maxValue="110"/>
<rich:message for="age"/>
<h:outputLabel value="Email Address:"
for="email"/>
<h:inputText id="email" label="Email Address"
required="true"
value="#{registrationBean.email}">
<f:validatorvalidatorId="emailValidator"/>
</h:inputText>
<rich:message for="email" />
<h:panelGroup/>
<h:commandButton id="register" value="Register"
action="confirmation" />
</h:panelGrid>
</h:form>
</rich:panel>
We encapsulate our form inside a <rich:panel> tag so that it is rendered
inside a panel. The <rich:select> tag is a RichFaces-specific component that
renders as a drop-down list. One advantage of <rich:select> over regular JSF
<h:selectOneMenu> is that <rich:select> can be configured as a combobox, in
which case it will accept typed input. To configure <rich:select> to be used as
a combobox, set its enableManualInput attribute to true .
The <rich:inputNumberSpinner> component allows the user to enter numeric
input either by directly typing it in or by clicking on arrows.
 
Search WWH ::




Custom Search