Ejemplo n.º 1
0
 private void performDestroy() {
   try {
     getFacade().remove(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("FamUserSeasonDeleted"));
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
   }
 }
Ejemplo n.º 2
0
 public String create() {
   try {
     getFacade().create(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("FamUserSeasonCreated"));
     return prepareView();
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }
Ejemplo n.º 3
0
  public String update() {
    try {
      getFacade().edit(current);
      /*if (current.getFamUser().getIdUser() == null) {
      getFacade().create(current);
      } else {
      getFacade().edit(current);
      }
      findAll();

      current = new FamUserSeason();  //reset form
       */
      JsfUtil.addSuccessMessage(
          ResourceBundle.getBundle("/Bundle").getString("FamUserSeasonUpdated"));
      return "View?faces-redirect=true";
    } catch (Exception e) {
      JsfUtil.addErrorMessage(
          e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
      return null;
    }
  }