/** UI event. On branch selection in the branch finder */
  public void selectBranch(SelectEvent event) {
    if (event.getObject() != null) {
      ViewBranch obj = (ViewBranch) event.getObject();

      signingBranch = obj.getBranchName();
      signingBranchCode = obj.getBranchCode();
    } // end if
  }
  public String onRowSelect(SelectEvent event) {

    // Booking :
    addMessage("Surgery booked", ((Surgery) event.getObject()).getName() + " has been booked.");
    doBookSurgery((Surgery) event.getObject());
    // return "patient_listOfDoctors"; // la redirection ne marche pas je
    // sais pas prk :3
    return "patient_listOfDoctors?faces-redirect=true";
  }
示例#3
0
 public void onRowSelect(SelectEvent event) {
   id_mov = ((CatMovimientos) event.getObject()).getId_mov();
   nom_mov = ((CatMovimientos) event.getObject()).getNom_mov();
   flg_tip = ((CatMovimientos) event.getObject()).getFlg_tip();
   if ("Entrada".equals(flg_tip)) {
     flg_tip = "false";
   } else {
     flg_tip = "true";
   }
 }
 public void onRowSelect(SelectEvent event) {
   FacesMessage msg =
       new FacesMessage(
           "Ticket Selected",
           "Ticket No "
               + ((TicketDTO) event.getObject()).getNumber()
               + " Train No"
               + ((TicketDTO) event.getObject()).getTrain().getNumber());
   //        getSheduleByStation(((StationDTO) event.getObject()).getName());
   ticketNumber = String.valueOf(((TicketDTO) event.getObject()).getNumber());
   trainNumber = String.valueOf(((TicketDTO) event.getObject()).getNumber());
   FacesContext.getCurrentInstance().addMessage(null, msg);
 }
 public void onRowSelect(SelectEvent event) {
   List list = ((List) event.getObject());
   //         if (new Registro().isCobrancaCarteirinha()) {
   //            if (!status.equals("nao_impressos")) {
   //                String validadeCarteirinha = list.get(6).toString();
   //                if (DataHoje.maiorData(DataHoje.data(), validadeCarteirinha)) {
   //                    GenericaMensagem.warn("SISTEMA", "CARTÃO ENCONTRA-SE VENCIDO! GERAR UMA
   // NOVA VIA");
   //                    return;
   //                }
   //            }
   //         }
   listaSelecionado.add(((List) event.getObject()));
 }
  public void onRowSelect(SelectEvent event) {

    FacesMessage msg =
        new FacesMessage(
            "Product Selected", String.valueOf(((Product) event.getObject()).getProductId()));
    FacesContext.getCurrentInstance().addMessage(null, msg);
  }
示例#7
0
 /**
  * É o que deve acontecer no momento em que for selecionado um aluno por meio do diálodo de
  * pesquisa de alunos.
  *
  * @param event
  */
 public void eventoSelecaoAluno(SelectEvent event) {
   Aluno aluno = (Aluno) event.getObject();
   setAlunoSelecionado(aluno);
   setDisabledBotaoExcluir(false);
   setRenderPainelInformacoes(true);
   setRenderPainelMensagem(false);
 }
 public void onRowSelect(SelectEvent event) {
   FacesMessage msg =
       new FacesMessage(
           UI.getMessages("Medicamento") + " " + UI.getMessages("common.selected"),
           ((Medicamento) event.getObject()).getNombreComercial());
   FacesContext.getCurrentInstance().addMessage("", msg);
 }
  public void onEventSelect(SelectEvent selectEvent) {
    UserEventVisibility visibility; // one of: CREATOR, VIEWER, NO_VISIBILITY
    int eventID;
    selectedEvent = (ScheduleEvent) selectEvent.getObject();
    eventID = Integer.parseInt(selectedEvent.getData().toString());
    String username = sessionUtility.getLoggedUser();

    try {
      visibility = um.getVisibilityOverEvent(eventID);
      sessionUtility.setParameter(eventID);
      SYSO_Testing.syso("FilterEvent. Username " + username);
      SYSO_Testing.syso("FilterEvent. I'm logged, and I've to check the visibility");
      if (visibility == CREATOR) {
        FacesContext fc = FacesContext.getCurrentInstance();
        sessionUtility.setParameter(eventID);
        fc.getApplication().getNavigationHandler().handleNavigation(fc, null, creatorOutcome);
        return;
      } else {
        if (visibility == VIEWER && !ef.find(eventID).isPrivateEvent()) {
          FacesContext fc = FacesContext.getCurrentInstance();
          sessionUtility.setParameter(eventID);
          fc.getApplication().getNavigationHandler().handleNavigation(fc, null, viewerOutcome);
          return;
        }
      }
    } catch (NotFoundException ex) {
      FacesContext fc = FacesContext.getCurrentInstance();
      fc.getApplication().getNavigationHandler().handleNavigation(fc, null, errorOutcome);
    }

    return;
  }
示例#10
0
  public void onRowSelect(SelectEvent event) {
    FacesMessage msg =
        new FacesMessage(
            "Producto Seleccionado",
            ((StockProductoTiendaOrigen) event.getObject()).getProducto().getNombreProducto());

    FacesContext.getCurrentInstance().addMessage(null, msg);
  }
  public void onRowSelect(SelectEvent event) {
    FacesMessage msg =
        new FacesMessage(
            UI.getMessages("module.BussinesEntityType") + " " + UI.getMessages("common.selected"),
            ((BussinesEntityType) event.getObject()).getName());

    FacesContext.getCurrentInstance().addMessage("", msg);
  }
  public void onOptionChosen(SelectEvent event) {

    String objectName =
        event.getObject().getClass().getName().replace("com.company.regis.db.entity.", "");

    if (objectName.equalsIgnoreCase("GeneralInformation")) {

      GeneralInformation item = (GeneralInformation) event.getObject();

      if (factorItem.equalsIgnoreCase("revise1Dialog")) {
        editObject.setRevise1(item.getInformation1());
        setListRevises(dropDownServices.getAllGeneralInformation("revise"));
      }

    } else if (objectName.equalsIgnoreCase("Employee")) {

    }
  }
示例#13
0
  public void onRowDblselect(SelectEvent event) {
    FacesContext context = FacesContext.getCurrentInstance();
    ConfigurableNavigationHandler handler =
        (ConfigurableNavigationHandler) context.getApplication().getNavigationHandler();
    Flash flash = context.getExternalContext().getFlash();
    flash.put("selectedCar", (StockProductoTiendaOrigen) event.getObject());

    handler.performNavigation("carDetail");
  }
 public void onRowSelectClienteNombreClick(SelectEvent event) {
   String nombre = event.getObject().toString();
   for (Cliente i : listClienteNombre) {
     if (i.getNombre().equals(nombre)) {
       selectedCliente = i;
       textoAutoCompleteNit = i.getNit();
       return;
     }
   }
 }
示例#15
0
  public String onRowSelect(SelectEvent event) {
    rolAux = (Rol) event.getObject();
    ModEl = "true";
    System.out.println(">>>>>>>>>>>>>>OnRowSelect" + rolAux.getRoltipo());
    if (!rolAux.getRoltipo().equalsIgnoreCase("Administrador")) {
      ModEl = "false";
    }

    return "";
  }
 public void enderecoRetornado(org.primefaces.event.SelectEvent event) {
   Endereco endereco = (Endereco) event.getObject();
   if (endereco != null) {
     if (!FrameworkFunctions.checkEmpty(endereco)) {
       if (endereco.getId() == null) {
         getEntity().getEnderecos().add(endereco);
       } else {
         getEntity().getEnderecos().set(endereco.getId().intValue(), endereco);
       }
     }
   }
 }
  /**
   * Quando o docente escolhe uma oferta de disciplina, adiciona os creditos da teoria e/ou pratica
   * a variavel creditosEscolhidos
   *
   * @param event
   */
  public void adicionaCredito(SelectEvent event) {
    OfertaDisciplina oferta = (OfertaDisciplina) event.getObject();

    switch (oferta.getFuncao()) {
      case "Teoria":
        creditosEscolhidos += oferta.getT();
        break;
      case "Pratica":
        creditosEscolhidos += oferta.getP();
        break;
      default:
        creditosEscolhidos += oferta.getT() + oferta.getP();
    }
  }
示例#18
0
  public void onDateSelect(SelectEvent selectEvent) {
    MyScheduleEvent scheduleEvent =
        new MyScheduleEvent(
            "", (Date) selectEvent.getObject(), (Date) selectEvent.getObject(), false);
    scheduleEvent.setNewEvent(true);
    scheduleEvent.setEditable(true);
    scheduleEvent.setOwner(currentUser.getAccount());
    scheduleEvent.setTitle("NEW TITLE");
    scheduleEvent.setRelatedType(EventRelatedType.PRIVATE);

    // test
    scheduleEvent.setLocation("NA");
    //

    scheduleEventBean = new ScheduleEventBean();
    scheduleEventBean.setEvent(scheduleEvent);

    // this.fileBean = new FileBean();
    // this.category.setSelectedCategory(null);
    // this.friendList.setEvent(null);
    // this.friendList.initialize();
    // this.friendList.getDifferenceList().clear();
  }
 public void empresaSelecionada(SelectEvent event) {
   PessoaJuridica empresa;
   try {
     empresa = (PessoaJuridica) event.getObject();
     this.getDadosPesquisa().setEmpresa(this.getEmpRN().pesquisaId(empresa.getIdPessoa()));
     this.getProdutoEstoque().setEmpresa(this.getDadosPesquisa().getEmpresa());
     this.info("Empresa selecionada");
     this.verifica = this.verifica + 1;
     if (this.getVerifica() >= 2) {
       this.btnAdicionar = false;
     }
   } catch (Exception e) {
     this.error("Problemas na seleção da empresa " + e.getMessage());
   }
 }
 public void produtoSelecionado(SelectEvent event) {
   Produto prod;
   try {
     prod = (Produto) event.getObject();
     this.getDadosPesquisa().setProduto(this.getProdRN().editPro(prod.getIdProduto()));
     this.getProdutoEstoque().setProduto(this.getDadosPesquisa().getProduto());
     this.info("Produto selecionado");
     this.verifica = this.verifica + 1;
     if (this.getVerifica() >= 2) {
       this.btnAdicionar = false;
     }
   } catch (Exception e) {
     this.error("Problemas na seleção do Produto " + e.getMessage());
   }
 }
示例#21
0
 public void onEventSelect(SelectEvent selectEvent) {
   // if(this.event == null){
   // this.event = new MyScheduleEvent();
   // }
   MyScheduleEvent scheduleEvent = (MyScheduleEvent) selectEvent.getObject();
   scheduleEventBean = new ScheduleEventBean(scheduleEvent);
   // this.fileBean = new FileBean();
   // fileBean.setUuid(getEvent().getUuid());
   // TODO: to be packaged;
   // fileBean.loadFiles(FileType.IMG);
   //
   // this.friendList.setEvent(this.event);
   // this.friendList.iniWithEvent();
   // this.friendList.getDifferenceList().clear();
   // category.setSelectedCategory(this.event.getCategory());
 }
 public void onRowSelect(SelectEvent event) {
   String id = ((Channel) event.getObject()).getId();
   try {
     comments = getCommentService().consultComments(id);
     FacesContext.getCurrentInstance().getExternalContext().redirect("comments.xhtml");
   } catch (SQLException sqex) {
     FacesMessage msg =
         new FacesMessage(
             FacesMessage.SEVERITY_ERROR, "Error!", "Ocurrió el error SQL: " + sqex.getMessage());
     FacesContext.getCurrentInstance().addMessage(null, msg);
   } catch (Exception ex) {
     FacesMessage msg =
         new FacesMessage(
             FacesMessage.SEVERITY_ERROR, "Error!", "Ocurrió el error: " + ex.getMessage());
     FacesContext.getCurrentInstance().addMessage(null, msg);
   }
 }
示例#23
0
  // SELECT PRESENTACION CLICK
  public void onRowSelectAlmacenClick(SelectEvent event) {
    try {
      Almacen almacen = (Almacen) event.getObject();
      System.out.println("onRowSelectAlmacenClick  " + almacen.getId());
      selectedAlmacen = almacen;
      newAlmacen = em.find(Almacen.class, almacen.getId());
      newAlmacen.setFechaRegistro(new Date());
      newAlmacen.setUsuarioRegistro(usuarioSession);

      tituloPanel = "Modificar Almacen";
      modificar = false;

    } catch (Exception e) {
      e.printStackTrace();
      System.out.println("Error in onRowSelectAlmacenClick: " + e.getMessage());
    }
  }
  public void onDateSelect(SelectEvent selectEvent) {
    Date event = (Date) selectEvent.getObject();
    Schedule schedule = (Schedule) selectEvent.getComponent();

    final TimeZone timeZone = schedule.calculateTimeZone();
    System.out.println(
        event
            + ": is in DaylightTime:"
            + timeZone.inDaylightTime(event)
            + ", getDSTSavings: "
            + timeZone.getDSTSavings());
    Calendar startDate = new GregorianCalendar();
    startDate.setTime(event);
    if (timeZone.inDaylightTime(event)) {
      startDate.add(Calendar.MILLISECOND, timeZone.getDSTSavings() * -1);
      event = startDate.getTime();
    }

    System.out.println("event start: " + event);
    Date now = new Date();
    startDate.setTime(now);
    startDate.add(Calendar.SECOND, 10);
    Trigger trigger =
        newTrigger().withIdentity("eventName", "eventGroup").startAt(startDate.getTime()).build();
    JobDetail job =
        newJob(MailJobJoinedToDeliveryDate.class)
            .withIdentity("deliverydate.isnull{" + startDate.getTime() + "}", "group-name")
            .build();
    try {
      scheduler.scheduleJob(job, trigger);
    } catch (SchedulerException e) {
      e.printStackTrace();
    }

    Calendar endDate = new GregorianCalendar();
    endDate.setTime(startDate.getTime());
    endDate.add(Calendar.HOUR, 1);

    BaseScheduleEvent scevent = new BaseScheduleEvent();
    scevent.setStartDate(startDate.getTime());
    scevent.setEndDate(endDate.getTime());
    scevent.setId("1");
    scevent.setTitle("teszt");
    eventModel.addEvent(scevent);
  }
 public void onRowSelectSucursalClick(SelectEvent event) {
   String nombre = event.getObject().toString();
   textSucursal = nombre;
   // Sucursal object = (Sucursal)event.getObject();
   // selectedSucursal = new Sucursal();
   for (Sucursal i : listSucursal) {
     if (i.getNombre().equals(nombre)) {
       selectedSucursal = i;
       Dosificacion dos = obtenerDosificacion(selectedSucursal);
       if (dos != null) {
         selectedFactura.setFechaLimiteEmision(dos.getFechaLimiteEmision());
         selectedFactura.setNumeroAutorizacion(dos.getNumeroAutorizacion());
         selectedFactura.setNumeroFactura(String.valueOf(dos.getNumeroSecuencia()));
         setSelectetDosificacion(obtenerDosificacion(i));
       }
       return;
     }
   }
 }
 public void selectedDataAtendimento(SelectEvent event) {
   SimpleDateFormat format = new SimpleDateFormat("d/M/yyyy");
   this.dataAtendimento = DataHoje.converte(format.format(event.getObject()));
 }
示例#27
0
 public void onSelect(SelectEvent event) {
   TagCloudItem item = (TagCloudItem) event.getObject();
   FacesMessage msg =
       new FacesMessage(FacesMessage.SEVERITY_INFO, "Item Selected", item.getLabel());
   FacesContext.getCurrentInstance().addMessage(null, msg);
 }
示例#28
0
 public void onRowSelect(SelectEvent event) {
   this.setEmpresa((Empresa) event.getObject());
   estado = "ATUALIZAR";
 }
 public void onResourceChosen(SelectEvent event) {
   ApplicationResource resource = (ApplicationResource) event.getObject();
   roleResourceRegistration.add(selectApplicationRole, resource);
   selectApplicationRole.addApplicationResource(resource);
 }
 public void onRowSelect(SelectEvent event) {
   selectApplicationRole = (ApplicationRole) event.getObject();
   currentApplicationResources = selectApplicationRole.getApplicationResources();
   if (selectApplicationRole != null) disabled = false;
 }