Java Reference
In-Depth Information
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getMiddleName() {
return middleName;
public void setMiddleName(String middleName) {
this.middleName = middleName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getEmail() {
return email;
public void setEmail(String email) { = email;
The @Named annotation marks this class as a CDI named bean. By default, the bean's
name will be the class name with its first character switched to lowercase (in our
example, the name of the bean is "customer", since the class name is Customer ).
We can override this behavior if we wish by passing the desired name to the value
attribute of the @Named annotation, as follows:
A CDI named bean's methods and properties are accessible via facelets, just like
regular JSF managed beans.
Search WWH ::

Custom Search