Java Reference
In-Depth Information
<h:outputLabel for="lastName" value="Surname" />
<h:inputText id="surname"
value="#{customer.surname}" />
<h:panelGroup />
</h:panelGrid>
</h:form>
</h:body>
</html>
Note
By default, the name of the bean will be the class name with its first letter switched to
lowercase; thus, the Customer bean can be referred to as customer .
If you want to use a different naming policy for your bean, you could use the @Named an-
notation as follows:
@Named(value="customNamed")
This way, we will be able to reference our CDI Beans using the identified custom-
Named value.
Instead of two @RequestScoped and @Named annotations, we can just use the
@Model annotation that aggregates them.
Search WWH ::




Custom Search