예제 #1
0
 private void performDestroy() {
   fCtx = FacesContext.getCurrentInstance();
   Map<String, String> reqMap = fCtx.getExternalContext().getRequestParameterMap();
   String email = (String) reqMap.get("email_account");
   try {
     getFacade().remove(current);
     JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("ExcepcionDeleted"));
     util.sendEmailAccounts(
         email,
         ejbFacadeUsuario.findAll(),
         ResourceBundle.getBundle("/Bundle").getString("DELETE")
             + current.getId()
             + " - "
             + current.getNombre(),
         ResourceBundle.getBundle("/Bundle").getString("EVENTO_DELETE"));
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
   }
 }
예제 #2
0
 public String create() {
   fCtx = FacesContext.getCurrentInstance();
   Map<String, String> reqMap = fCtx.getExternalContext().getRequestParameterMap();
   String email = (String) reqMap.get("email_account");
   try {
     getFacade().create(current);
     JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("ExcepcionCreated"));
     util.sendEmailAccounts(
         email,
         ejbFacadeUsuario.findAll(),
         ResourceBundle.getBundle("/Bundle").getString("ADD")
             + current.getId()
             + " - "
             + current.getNombre(),
         ResourceBundle.getBundle("/Bundle").getString("EVENTO_ADD"));
     return prepareCreate();
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }