예제 #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);
 }