{
log.warn("ItemBean::PrepareViewAction params: " + "immediateAction: " + immediateAction + " immediateUrl: " + immediateUrl + " returnAction: " + returnAction + " returnUrl: " + returnUrl);
this.returnUrl = returnUrl;
this.returnAction = returnAction;
List<PersonEntity> personFetchList = new ArrayList<PersonEntity>();
IPersonService personService = new PersonServiceImpl();
switch(EntityAction.valueOf(immediateAction))
{
case CREATE:
PostViewAction(immediateAction, null);
break;
case READ_ALL:
try
{
//TODO: fetch 20 then next 20 ...etc Customize retrieveQuickAll by adding range
this.setItemList(itemService.retrieveQuickAll());
}
catch (Exception ex)
{
java.util.logging.Logger.getLogger(PersonBean.class.getName()).log(Level.SEVERE, null, ex);
//TODO: generate JSF Error ...
}
break;
case UPDATE_ROLE:
//clear selected lists
this.selectedAvailableSavedRoles.clear();
this.selectedSavedRoles.clear();
//1. obtain all roles in the system
//1.1. person role
try
{
//TODO: fetch 20 then next 20 ...etc Customize retrieveQuickAll by adding range
personFetchList = personService.getAll();
}
catch (Exception ex)
{
java.util.logging.Logger.getLogger(PersonBean.class.getName()).log(Level.SEVERE, null, ex);
//TODO: generate JSF Error ...