Creating the messagefactory.java file – HP Integrity NonStop J-Series User Manual
Page 291
![background image](/manuals/397993/291/background.png)
setAge(employee.getAge());
setEmail(employee.getEmail());
setFirstname(employee.getFirstname());
setLastname(employee.getLastname());
resetUpdate();
} else {
s1 = "Incorrect";
state1 = true;
}
} else {
ntexist = true;
}
return s1;
}
public boolean isState() {
return state;
}
public void setState(boolean state) {
this.state = state;
}
public boolean isState1() {
return state1;
}
public void setState1(boolean state1) {
this.state1 = state1;
}
public boolean isNtexist() {
return ntexist;
}
public void setNtexist(boolean ntexist) {
this.ntexist = ntexist;
}
public String resetInsert() {
setAge(0);
setEmail(null);
setEmpid(0);
setFirstname(null);
setLastname(null);
setRord(null);
exist = false;
return "insert";
}
public String resetUpdate() {
setEmpid(0);
setRord(null);
state = false;
state1 = false;
return "update";
}
}
Creating the MessageFactory.java File
The MessageFactory.java class loads the message bundle of the specific locale and is used
in the Bean class to set the appropriate message for different fields when required.
To create the MessageFactory.java file in the com.hp.empinfo.web package, complete
the following steps:
Integrating MyFaces into Spring
291