Пример #1
0
 private void performDestroy() {
   try {
     getFacade().remove(current);
     JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("BarrelDeleted"));
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
   }
 }
Пример #2
0
 public String create() {
   try {
     getFacade().create(current);
     JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("BarrelCreated"));
     return prepareCreate();
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }
Пример #3
0
 public String update() {
   try {
     getFacade().edit(current);
     JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("BarrelUpdated"));
     return "View";
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }