public void onClick$btnGuardarIngresoCantidadPreparaciones(Event event) {
   logger.log(
       Level.INFO,
       "[PreparacionesEmpleadoMttoCtrl][onClick$btnGuardarIngresoCantidadPreparaciones]");
   GenericResponse resp;
   try {
     if (planillaDetalleSelected == null) {
       throw new FmWebException(
           Constants.CODE_OPERATION_EXCEPTION, "Debe de seleccionar un empleado!!");
     }
     if (intCantidadPrepNormales.getValue() == null) {
       throw new FmWebException(
           Constants.CODE_OPERATION_EXCEPTION, "Ingrese la cantidad de preparaciones normales!!");
     }
     if (intCantidadPrepEmbalsamado.getValue() == null) {
       throw new FmWebException(
           Constants.CODE_OPERATION_EXCEPTION,
           "Ingrese la cantidad de preparaciones embalsamadas!!");
     }
     if (intCantidadPrepEnjabado.getValue() == null) {
       throw new FmWebException(
           Constants.CODE_OPERATION_EXCEPTION, "Ingrese la cantidad de preparaciones enjabadas!!");
     }
     planillaDetalleSelected.setCantPreparacionNormal(intCantidadPrepNormales.getValue());
     planillaDetalleSelected.setCantPreparacionEmbalsam(intCantidadPrepEmbalsamado.getValue());
     planillaDetalleSelected.setCantPreparacionEnjabado(intCantidadPrepEnjabado.getValue());
     planillaDetalleSelected.setEstadoRegistro(Boolean.TRUE);
     planillaDetalleSelected.setFechaEvento(new Date());
     planillaDetalleSelected.setCodigoEmpleadoUsuario(getUserLogin().getUsuario());
     resp =
         usuarioBean.saveOrModifyEntity(
             planillaDetalleSelected,
             planillaDetalleSelected.getCodigoDetallePlanilla() == null); // Boolean.TRUE
     if (resp.getCodigoRespuesta().intValue() == Constants.CODE_OPERATION_OK.intValue()) {
       //                if (resp.getObjeto() != null) {
       //                    planillaDetalleSelected = (PlanillaDetalle) resp.getObjeto();
       //                }
       MensajeMultilinea.show("Registro almacenado exitosamente!!", Constants.MENSAJE_TIPO_INFO);
       listaPlanillaDetalles = null;
       renderizarDatosPlanillaDetalle();
     } else {
       MensajeMultilinea.show(resp.getMensajeRespuesta(), Constants.MENSAJE_TIPO_ERROR);
     }
   } catch (FmWebException fwe) {
     MensajeMultilinea.show(fwe.getMensaje(), Constants.MENSAJE_TIPO_ALERTA);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 private Boolean validarCampos() throws FmWebException {
   logger.log(Level.INFO, "[TipoAbonoMttoCtrl][validarCampos]");
   Boolean resp = Boolean.FALSE;
   try {
     if (StringUtils.isBlank(txtDescripcionTipoAbono.getValue())) {
       throw new FmWebException(
           Constants.CODE_OPERATION_EXCEPTION,
           "Ingrese una descripcion de la tipoAbono a guardar!!");
     }
     resp = Boolean.TRUE;
   } catch (FmWebException fwe) {
     throw new FmWebException(Constants.CODE_OPERATION_EXCEPTION, fwe.getMensaje());
   } catch (Exception e) {
     throw new FmWebException(
         Constants.CODE_OPERATION_EXCEPTION,
         "Se produjo una excepción, favor comunicarse con el administrador del sistema!!");
   }
   return resp;
 }
 public void onClick$btnSaveNewTipoAbono(ForwardEvent event) throws InterruptedException {
   logger.log(Level.INFO, "[TipoAbonoMttoCtrl][onClick$btnSaveNewTipoAbono]");
   GenericResponse respuesta;
   Boolean isSave;
   try {
     if (validarCampos()) {
       if (tipoAbonoSelected == null) {
         tipoAbonoSelected = new TipoAbono();
       }
       tipoAbonoSelected.setDescripcionTipoAbono(txtDescripcionTipoAbono.getValue());
       tipoAbonoSelected.setEstadoRegistro(checkEstadoTipoAbono.isChecked());
       tipoAbonoSelected.setCodigoEmpleadoUsuario(getUserLogin().getUsuario());
       tipoAbonoSelected.setFechaEvento(new Date());
       isSave =
           (accion != null && accion == Constants.ACCION_MANTTO_MODIFY)
               ? Boolean.FALSE
               : Boolean.TRUE;
       respuesta = catalogoBean.saveOrModifyEntity(tipoAbonoSelected, isSave);
       if (respuesta != null
           && respuesta.getCodigoRespuesta().intValue()
               == Constants.CODE_OPERATION_OK.intValue()) {
         if (tipoAbonoListaCtrl != null) {
           if (isSave) {
             tipoAbonoListaCtrl.loadTipoAbono(Constants.CARGA_BASE_FECHA_DESC);
           } else {
             tipoAbonoListaCtrl.loadTipoAbono(Constants.CARGA_BASE_NOMBRE);
           }
         }
         tipoAbonoMttoWindow.onClose();
         MensajeMultilinea.show(respuesta.getMensajeRespuesta(), Constants.MENSAJE_TIPO_INFO);
       } else {
         MensajeMultilinea.show("Error al ejecutar la operación!!", Constants.MENSAJE_TIPO_ERROR);
       }
     }
   } catch (FmWebException fwe) {
     MensajeMultilinea.show(fwe.getMensaje(), Constants.MENSAJE_TIPO_ALERTA);
   } catch (FmBusinessRolledbackException fbe) {
     MensajeMultilinea.show(fbe.getMensaje(), Constants.MENSAJE_TIPO_ERROR);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }