public String action_edit(ActionEvent evt) {
    selectedAnexosRespuesta =
        (AnexosRespuestaDTO) (evt.getComponent().getAttributes().get("selectedAnexosRespuesta"));
    txtAdjuntoDocumento.setValue(selectedAnexosRespuesta.getAdjuntoDocumento());
    txtAdjuntoDocumento.setDisabled(false);
    txtDocumentoReal.setValue(selectedAnexosRespuesta.getDocumentoReal());
    txtDocumentoReal.setDisabled(false);
    txtEstadoRegistro.setValue(selectedAnexosRespuesta.getEstadoRegistro());
    txtEstadoRegistro.setDisabled(false);
    txtFechaCreacion.setValue(selectedAnexosRespuesta.getFechaCreacion());
    txtFechaCreacion.setDisabled(false);
    txtNombreAnexo.setValue(selectedAnexosRespuesta.getNombreAnexo());
    txtNombreAnexo.setDisabled(false);
    txtNombreBusqueda.setValue(selectedAnexosRespuesta.getNombreBusqueda());
    txtNombreBusqueda.setDisabled(false);
    txtUsuarioCreador.setValue(selectedAnexosRespuesta.getUsuarioCreador());
    txtUsuarioCreador.setDisabled(false);
    txtIdAnexoPqr_AnexosPqr.setValue(selectedAnexosRespuesta.getIdAnexoPqr_AnexosPqr());
    txtIdAnexoPqr_AnexosPqr.setDisabled(false);
    txtIdRespSol_RespuestaSol.setValue(selectedAnexosRespuesta.getIdRespSol_RespuestaSol());
    txtIdRespSol_RespuestaSol.setDisabled(false);
    txtIdAnxResp.setValue(selectedAnexosRespuesta.getIdAnxResp());
    txtIdAnxResp.setDisabled(true);
    btnSave.setDisabled(false);
    setShowDialog(true);

    return "";
  }
 /**
  * TODO: There's a bug in I have a rich:tree with drag-n-drop support and an attached
  * rich:contextMenu to the nestet rich:treeNode. if you click right on a node, the contextMenu
  * will open. After click on the menuItem the cursor changes to the dragIndicator Icon and you
  * drag/drop the element. The correct behavior should be that nothing happens in terms of
  * drag-n-drop after click on a contextMenu in a tree.
  * https://cloud.prod.atl2.jboss.com:8443/jira/browse/RF-2516;jsessionid=146683782496939F59F8D6156B35AA9F?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
  * --> fixed, need to update version of RichFaces
  *
  * @param event
  */
 public void processLeafContextMenuAddProperty(ActionEvent event) {
   UITreeNode srcNode =
       (event.getComponent().getParent().getParent() instanceof UITreeNode)
           ? (UITreeNode) event.getComponent().getParent().getParent()
           : null;
   processAddNodeActionEvent(srcNode);
 }
  /** Se define la accion del boton Modificar */
  public void btnModificarActionPerformed(ActionEvent e) {

    if (!e.getPhaseId().equals(PhaseId.INVOKE_APPLICATION)) {
      e.setPhaseId(PhaseId.INVOKE_APPLICATION);
      e.queue();
    }
    examenMedicoBean = new ExamenMedicoBean();
    examenMedicoBean.setCo_ExamenMed(co_ExamenMed);
    examenMedicoBean.setCodigo(codigo);
    examenMedicoBean.setAlturaPromedioSalto(alturaPromedioSalto);
    examenMedicoBean.setApellidoMaterno(apellidoMaterno);
    examenMedicoBean.setApellidoPaterno(apellidoPaterno);
    examenMedicoBean.setExamenOrina(examenOrina);
    examenMedicoBean.setExamenSangre(examenSangre);
    examenMedicoBean.setLongitudAntebrazo(longitudAntebrazo);
    examenMedicoBean.setLongitudBrazo(longitudBrazo);
    examenMedicoBean.setLongitudCintura(longitudCintura);
    examenMedicoBean.setLongitudCuello(longitudCuello);
    examenMedicoBean.setLongitudMuslo(longitudMuslo);
    examenMedicoBean.setLongitudPecho(longitudPecho);
    examenMedicoBean.setNombre(nombre);
    examenMedicoBean.setPeso(peso);
    examenMedicoBean.setResistencia(resistencia);
    examenMedicoBean.setTalla(talla);
    examenMedicoBean.setTemporada(getSelectedTemporada());
    setExamenesMedicos(getExamenMedicoServices().modificarExamenMedico(examenMedicoBean));
  }
  public void actualizarSesion(ActionEvent event) {
    int s_cambio;
    int s_ses_id;
    int s_doc_ant;
    String tipo;
    HSAsistenciaDocenteDAO asistDocDAO;
    Object obj_inicio;
    Object obj_fin;

    s_ses_id = CommonWeb.parseObjToInt(CommonWeb.getParamFromUIParameterUI(event, "p_ses_id"));
    s_cambio = CommonWeb.parseObjToInt(CommonWeb.getParamFromUIParameterUI(event, "p_cambio"));
    s_doc_ant = CommonWeb.parseObjToInt(CommonWeb.getParamFromUIParameterUI(event, "p_doc_ant"));
    obj_inicio = ((UIParameter) event.getComponent().findComponent("p_inicio")).getValue();
    obj_fin = ((UIParameter) event.getComponent().findComponent("p_fin")).getValue();

    Date s_inicio = (Date) obj_inicio;
    Date s_fin = (Date) obj_fin;
    try {
      asistDocDAO = CommonDAO.getAsistenciaDocenteDAO();

      tipo = s_cambio != s_doc_ant ? "047002" : "047001";

      asistDocDAO.actualizarSesionDocente(s_ses_id, s_cambio, s_inicio, s_fin, tipo);

      this.mostrarSessionAsistencia(event);

      this.setOncomplete(
          "javascript:alert('SE ACTUALIZO CORRECTAMENTE LA SESSION');"
              + "Richfaces.hideModalPanel('mpSessionAsis')");
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 /*GUARDAMOS LA OBSERVACION EN LA TABLA AC_SESION_ASISTENCIA*/
 public void guardarObservacionAsistencia(ActionEvent event) {
   int p_ses_id =
       Integer.parseInt(
           ((UIParameter) event.getComponent().findComponent("p_ses_id")).getValue().toString());
   int s_doc_aux_id =
       Integer.parseInt(
           ((UIParameter) event.getComponent().findComponent("p_doc_id")).getValue().toString());
   int p_sesefec_id =
       Integer.parseInt(
           ((UIParameter) event.getComponent().findComponent("p_sesefec_id"))
               .getValue()
               .toString());
   String estadoDocTipo;
   try {
     if (this.getAsisDocenteCL().getEstasis_code_diario().equals("0")) {
       this.setOncompleteADD("javascript:alert('SELECCIONE UN TIPO DE ASISTENCIA');");
     } else {
       HSAsistenciaDocenteDAO dao =
           (HSAsistenciaDocenteDAO) ServiceFinder.findBean("SpringHibernateDaoAsistenciaDocente");
       AcSesionAsistencia sesAsis = new AcSesionAsistencia();
       sesAsis.setSesEstadoDocTipo(this.getAsisDocenteCL().getEstasis_code_diario());
       estadoDocTipo = this.getAsisDocenteCL().getEstasis_code_diario();
       String sesObservacion = this.getAsisDocenteCL().getSesObservacion();
       dao.actualizarObservacionSesionDocente(p_ses_id, estadoDocTipo, sesObservacion);
       this.mostrarAsistenciaDiaria(event);
       this.setOncompleteADD(
           "javascript:alert('REGISTRO COMPLETO');"
               + "Richfaces.hideModalPanel('mpAsisDocenteDiaria')");
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 public void placeBid(ActionEvent event) {
   FacesContext ctx = FacesContext.getCurrentInstance();
   if (bid != null) {
     if (bid <= highestBid) {
       ctx.addMessage(
           event.getComponent().getClientId(ctx),
           new FacesMessage(
               FacesMessage.SEVERITY_WARN,
               "Bid amount is lower that highest bid",
               "You need to bid amount higher that highest bid"));
       won = false;
       loose = true;
     } else {
       highestBid = bid;
       won = true;
       loose = false;
       amount = bid;
     }
   } else {
     ctx.addMessage(
         event.getComponent().getClientId(ctx),
         new FacesMessage(
             FacesMessage.SEVERITY_ERROR, "Bid value is missing", "You must provide bid value"));
   }
 }
 public void processPropertyDblClick(ActionEvent event) {
   UITreeNode srcNode =
       (event.getComponent().getParent() instanceof UITreeNode)
           ? (UITreeNode) event.getComponent().getParent()
           : null;
   processAddNodeActionEvent(srcNode);
 }
Beispiel #8
0
 public void recebeViaActionListener(ActionEvent ev) {
   System.out.println("Executado actionListener " + ev.getComponent().getId());
   FacesContext.getCurrentInstance()
       .addMessage(
           null,
           new FacesMessage(
               "Executado actionListener, tem acesso aos atributos do botão, o id do botão que clicou é: "
                   + ev.getComponent().getId()));
 }
  /** Se define la accion del boton Eliminar */
  public void btnEliminarActionPerformed(ActionEvent e) {

    if (!e.getPhaseId().equals(PhaseId.INVOKE_APPLICATION)) {
      e.setPhaseId(PhaseId.INVOKE_APPLICATION);
      e.queue();
    }
    btnlimpiarActionPerformed();
    setExamenesMedicos(
        (ArrayList<ExamenMedicoBean>)
            getExamenMedicoServices().eliminarExamenMedico(this.getExamenMedicoBean()));
  }
 /**
  * This method navigate selection MetricScreen.
  *
  * @param actionEvent - instance of ActionEvent
  */
 public void handleMetricIdActionEvent(ActionEvent actionEvent) {
   try {
     Long editMetricId = (Long) actionEvent.getComponent().getAttributes().get(EDIT_METRIC_ID);
     Long editPrivilegeId =
         (Long) actionEvent.getComponent().getAttributes().get("privilegeIdForSelectMetric");
     setValueToSessionParam(EDIT_METRIC_ID, editMetricId);
     setValueToSessionParam("privilegeIdForSelectMetric", editPrivilegeId);
   } catch (Exception exception) {
     OPPE_LOG.error("DATABASE_RETRIEVE_ERROR", exception);
     showGenericError();
   }
 }
Beispiel #11
0
 public void carregarItemMenuListener(ActionEvent event) {
   String migalha = null;
   String idCommandLink = null;
   if (event.getSource() instanceof HtmlCommandLink) {
     HtmlCommandLink commandLink = (HtmlCommandLink) event.getSource();
     idCommandLink = (String) commandLink.getId();
     Acesso acessoTemp = mapAcessos.get(idCommandLink);
     if (acessoTemp != null) {
       migalha = acessoTemp.obterMigalha();
     }
   }
   FacesUtil.adicionarAtributoSessao(MIGALHA, migalha);
 }
  @Override
  public String setOperation(ActionEvent actionEvent) {
    setCustomOperation(
        (String) actionEvent.getComponent().getAttributes().get("DC_OPERATION_BINDING"));

    return super.setOperation(actionEvent);
  }
  public void selStagePropChange(ActionEvent e) {
    String selPropertyID = null, selStageName = null, selValue = null;
    FacesContext context = FacesContext.getCurrentInstance();
    Object o1 = context.getExternalContext().getRequestParameterMap().get("selPropID");
    if (o1 != null) selPropertyID = (String) o1;
    Object o2 = context.getExternalContext().getRequestParameterMap().get("selPropStageName");
    if (o2 != null) selStageName = (String) o2;

    Object source = e.getComponent();
    if (source instanceof HtmlAjaxCommandButton) {
      HtmlAjaxCommandButton sel = (HtmlAjaxCommandButton) source;
      selValue = (String) sel.getValue();
    }

    if (selPropertyID == null || selStageName == null || selValue == null) return;

    // all required parameters received - now store the updates
    HashMap<String, String> selection;
    if (!stageProps.containsKey(selPropertyID)) {
      selection = new HashMap<String, String>();
    } else {
      selection = stageProps.get(selPropertyID);
    }
    selection.put(selStageName, selValue);
    stageProps.put(selPropertyID, selection);
  }
Beispiel #14
0
 public void removePkgItem(ActionEvent event) {
   BuyPkgItem pkgItem = (BuyPkgItem) event.getComponent().getAttributes().get("pkgRsv");
   getPkgItems().remove(pkgItem);
   bimbl.removeBuyPkgItem(pkgItem);
   FacesMessage msg = new FacesMessage("Your item is deleted! ");
   FacesContext.getCurrentInstance().addMessage(null, msg);
 }
  public void deleteUploadedFile(ActionEvent actionEvent) {

    UICommand uiCommand = (UICommand) actionEvent.getComponent();
    String fileId = (String) uiCommand.getValue();

    try {
      List<UploadedFile> uploadedFiles = htmlInputFileModelBean.getUploadedFiles();

      UploadedFile uploadedFileToDelete = null;

      for (UploadedFile uploadedFile : uploadedFiles) {

        if (uploadedFile.getId().equals(fileId)) {
          uploadedFileToDelete = uploadedFile;

          break;
        }
      }

      if (uploadedFileToDelete != null) {
        uploadedFileToDelete.delete();
        uploadedFiles.remove(uploadedFileToDelete);
        logger.debug("Deleted file=[{0}]", uploadedFileToDelete.getName());
      }
    } catch (Exception e) {
      logger.error(e);
    }
  }
Beispiel #16
0
 // 编写处理Action事件的方法
 public void process(ActionEvent ae) {
   if (name.equals("疯狂Java讲义")) {
     price.setValue(ae.getComponent());
     price.setSize(60);
     price.setStyle("background-color:#1111ff;" + "font-weight:bold");
   }
 }
  /** Will add the specified type - value metadata as a property to the selected resource. */
  public void processAction(ActionEvent actionEvent) throws AbortProcessingException {
    UIComponent comp = actionEvent.getComponent();
    String id = comp.getId();
    UIComponent superParent = comp;
    WebDAVCategories realCategories = null;
    while (superParent.getParent() != null) {
      superParent = superParent.getParent();
      if (superParent instanceof WebDAVCategories) {
        realCategories = (WebDAVCategories) superParent;
      }
    }

    if (realCategories == null) {
      realCategories = (WebDAVCategories) superParent.findComponent(getId());
    }

    if (id.equalsIgnoreCase(getAddButtonId())) {
      //	Add a category to the list of selectable categories
      //	This is input for adding a category
      HtmlInputText newCategoryInput =
          (HtmlInputText) comp.getParent().findComponent(getAddCategoryInputId());

      String newCategoryName = newCategoryInput.getValue().toString();
      CategoryBean.getInstance().addCategory(newCategoryName);
      if (realCategories != null) {
        realCategories.reset();
      }
      return;
    } else if (id.equalsIgnoreCase(getSaveButtonId())) {
      realCategories.saveCategoriesSettings();
    }
  }
  public void seleccionarProcesar(ActionEvent event) {
    boolean exito = Boolean.FALSE;
    String mensaje = "";
    try {
      registroSeleccionado = (LibroMayor) event.getComponent().getAttributes().get("item");
      log.info("reg selec:" + registroSeleccionado);

      cierreFacade.mayorizar(registroSeleccionado);

      registroSeleccionado.setEsProcesado(Boolean.TRUE);
      seleccionaRegistro = Boolean.FALSE;
      exito = Boolean.TRUE;
      mensaje =
          "Se realizó el proceso de mayorización correctamente para el periodo "
              + registroSeleccionado.getId().getIntContMesMayor()
              + "-"
              + registroSeleccionado.getId().getIntContPeriodoMayor()
              + ".";
    } catch (MayorizacionException e) {
      mensaje = e.getMessage();
      log.error(e.getMessage(), e);
    } catch (Exception e) {
      mensaje =
          "Hubo un error durante el proceso de mayorización para el periodo "
              + registroSeleccionado.getId().getIntContMesMayor()
              + "-"
              + registroSeleccionado.getId().getIntContPeriodoMayor()
              + ".";
      log.error(e.getMessage(), e);
    } finally {
      mostrarMensaje(exito, mensaje);
    }
  }
Beispiel #19
0
 public void buttonClicked(ActionEvent e) {
   CustomButtonNode currentButton = (CustomButtonNode) e.getSource();
   if (currentButton.isExpanded()) {
     collapseNode(currentButton);
   } else {
     expandNode(currentButton);
   }
 }
Beispiel #20
0
  public void rowDtTablaSysInforme_ActionEvent(ActionEvent ae) {

    TablaSysInforme tsi = (TablaSysInforme) ae.getComponent().getAttributes().get("sysInformeSel");
    sysInformeSel = tsi.getSysInforme();
    HashMap hs = new HashMap();
    hs.put("p_lgreg_id", 1835L);
    RecursoDescarga rd = genInfRecurso(hs, sysInformeSel, 1);
    irAServletDescarga(rd);
  }
 public void seleccionarRegistro(ActionEvent event) {
   try {
     registroSeleccionado = (LibroMayor) event.getComponent().getAttributes().get("item");
     seleccionaRegistro = Boolean.TRUE;
     log.info("reg selec:" + registroSeleccionado);
   } catch (Exception e) {
     log.error(e.getMessage(), e);
   }
 }
 /**
  * Looks up the parent naming container for the component source of the action event, and reset
  * components recursively within this container.
  */
 public void resetComponents(ActionEvent event) {
   UIComponent component = event.getComponent();
   if (component == null) {
     return;
   }
   // take first anchor and force flush on every resettable component
   UIComponent anchor = ComponentUtils.getBase(component);
   resetComponentResursive(anchor);
 }
 public void seleccionarRegistro(ActionEvent event) {
   try {
     cargarUsuario();
     registroSeleccionado = (SolicitudPersonal) event.getComponent().getAttributes().get("item");
     log.info(registroSeleccionado);
   } catch (Exception e) {
     log.error(e.getMessage(), e);
   }
 }
 /** @deprecated since 5.5: local theme configuration now only handles flavors. */
 @Deprecated
 public void themeChange(ActionEvent event) {
   UIComponent select = event.getComponent().getParent();
   if (select instanceof ValueHolder) {
     theme = (String) ((ValueHolder) select).getValue();
   } else {
     log.error("Bad component returned " + select);
     throw new AbortProcessingException("Bad component returned " + select);
   }
 }
  public void handleClick(ActionEvent event) {
    Object id = event.getComponent().getAttributes().get("paramMouseId");
    Object key = event.getComponent().getAttributes().get("paramMouseKey");

    System.out.println("Handle click is called");

    this.genotypeDataModel.setWrappedData(new ArrayList<GenotypeEntity>());
    this.isGenotypeResultCountDisplayed = false;
    this.setGenotypePopupSearch(new GenotypeSearchDTO());

    if (id != null) {
      this.genotypePopupSearch.setMouseID(id.toString());
      System.out.println(this.genotypePopupSearch.getMouseID());
    }

    if (key != null) {
      this.genotypePopupSearch.setMouseKey((Integer) key);
    }
  }
Beispiel #26
0
 public void removeShowTicketItem(ActionEvent event) {
   System.err.println("start to delete show ticket");
   BuyShowTicketItem showTicket =
       (BuyShowTicketItem) event.getComponent().getAttributes().get("showticket");
   System.err.println("show ticket " + showTicket.getTicketName());
   this.getShowItems().remove(showTicket);
   FacesMessage msg = new FacesMessage("Your item is deleted! ");
   bimbl.removeBuyShowItem(showTicket);
   System.err.println("delete done");
   FacesContext.getCurrentInstance().addMessage(null, msg);
 }
 public void processAction(ActionEvent e) {
   FacesContext context = FacesContext.getCurrentInstance();
   Map<String, Object> requestMap =
       FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
   String curValue = (String) requestMap.get("actionEvents");
   if (null == curValue) {
     curValue = "";
   }
   curValue = curValue + " [" + e.getComponent().getClientId(context) + "]";
   requestMap.put("actionEvents", curValue);
 }
 public void seleccionarFromDataGrid(ActionEvent ae) {
   try {
     UIDataGrid table = (UIDataGrid) ae.getComponent().getParent();
     this.tblComprobanteDonacion =
         this.facade.find(((TblComprobanteDonacion) table.getRowData()).getNumComDonacion());
     this.cblDetalleComprobanteDonacionList.clear();
   } catch (Exception x) {
     x.printStackTrace();
     this.addError(x.getMessage(), x.getMessage());
   }
 }
Beispiel #29
0
 public void processAction(ActionEvent event) throws AbortProcessingException {
   log.debug("TreeHandler::processAction()");
   UIComponent component = (UIComponent) event.getSource();
   while (!(component != null && component instanceof HtmlTree)) {
     component = component.getParent();
   }
   if (component != null) {
     HtmlTree tree = (HtmlTree) component;
     tree.setNodeSelected(event);
   }
 }
 public void verSolicitudPersonalDetalle(ActionEvent event) {
   try {
     strMensajeDetalle = "";
     mostrarMensajeDetalle = Boolean.FALSE;
     solicitudPersonalDetalleNuevo =
         (SolicitudPersonalDetalle) event.getComponent().getAttributes().get("item");
     seleccionarSucursalDetalle();
   } catch (Exception e) {
     log.error(e.getMessage(), e);
   }
 }