Esempio n. 1
0
 private void performDestroy() {
   try {
     getFacade().remove(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("TipocomitenteDeleted"));
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
   }
 }
 public String update() {
   try {
     getFacade().edit(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("RendicionexternaUpdated"));
     return "View";
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }
Esempio n. 3
0
 public String create() {
   try {
     getFacade().create(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("TipoentidadCreated"));
     // return prepareCreate();
     return null;
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }
  public String create() {

    try {

      System.out.println(
          "Current > Lista de Comprobantes > " + current.getArchivorendicionList().size());

      for (Archivorendicion ar : current.getArchivorendicionList()) {
        ar.setRendicionexternaid(current);
      }

      getFacade().create(current);

      JsfUtil.addSuccessMessage("Rendición Externa Creada!");
      return prepareList();
    } catch (Exception e) {
      JsfUtil.addErrorMessage(
          e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
      return null;
    }
  }