private void performDestroy() { try { getFacade().remove(current); JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("EmployeeDeleted")); } catch (Exception e) { JsfUtil.addErrorMessage( e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured")); } }
public String update() { try { getFacade().edit(current); JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("EmployeeUpdated")); return "View"; } catch (Exception e) { JsfUtil.addErrorMessage( e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured")); return null; } }
public String create() { try { getFacade().create(current); JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("EmployeeCreated")); return prepareCreate(); } catch (Exception e) { JsfUtil.addErrorMessage( e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured")); return null; } }