Пример #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"));
   }
 }
Пример #2
0
 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;
   }
 }
Пример #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;
   }
 }
Пример #4
0
  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;
    }
  }
Пример #5
0
 public SelectItem[] getItemsAvailableSelectOne() {
   return JsfUtil.getSelectItems(ejbFacade.findAll(), true);
 }
Пример #6
0
 public SelectItem[] getItemsAvailableSelectMany() {
   return JsfUtil.getSelectItems(ejbFacade.findAll(), false);
 }