//POST VIEW ACTIONS
public String PostViewAction(String action, PersonEntity personEntity)
{
log.warn("PersonBean::PostViewAction param: " + action);
PersonEntity person = new PersonEntity();
switch(EntityAction.valueOf(action))
{
case CREATE:
person.setFirstName(firstName);
person.setLastName(lastName);
person.setGender(gender);
dob.setTime(date);
person.setDob(dob);
try
{
personService.create((PersonEntity) person);
}
catch (Exception ex)
{
java.util.logging.Logger.getLogger(PersonBean.class.getName()).log(Level.SEVERE, null, ex);
//TODO: generate JSF Error ...
}
break;
case UPDATE:
person.setFirstName(firstName);
person.setLastName(lastName);
person.setGender(gender);
dob.setTime(date);
person.setDob(dob);
person.setId(personID);
try
{
personService.update((PersonEntity) person);
}
catch (Exception ex)