示例#1
1
  public void onUpload$button_Lampiran(UploadEvent event) throws IOException {
    Media media = event.getMedia();
    // allowed_types : zip/ rar/ word/ excel/ pdf/ txt.
    String file = media.getName();
    int zip = file.indexOf("zip");
    int rar = file.indexOf("rar");
    int doc = file.indexOf("doc");
    int docx = file.indexOf("docx");
    int xls = file.indexOf("xls");
    int xlsx = file.indexOf("xlsx");
    int pdf = file.indexOf("pdf");

    if (zip != -1 || rar != -1 || doc != -1 || docx != -1 || pdf != -1 || xls != -1 || xlsx != -1) {
      setUploadMedia(media);
      label_viewAttachment.setValue(file);
    } else {
      alert("Silahkan gunakan format : zip/ rar/ word/ excel/ pdf");
    }
  }
  public void onSelect$poste_travail() throws SQLException {
    message.setValue("");

    String poste = (String) map_poste.get((String) poste_travail.getSelectedItem().getLabel());

    CategoryModel catmodel = new SimpleCategoryModel();
    List charts = new ArrayList<CategoryModel>();
    StatMoyFamillePosteBean cpb;
    Iterator it;
    StatCotationEmployeModel cotationMoel = new StatCotationEmployeModel();
    List sect_items = cotationMoel.getListPosteMoyFam(poste);
    it = sect_items.iterator();
    if (sect_items.size() > 0) {
      mychart.setVisible(true);
      while (it.hasNext()) {
        cpb = (StatMoyFamillePosteBean) it.next();

        catmodel.setValue(cpb.getFamille(), "Familles de compétence", cpb.getMoy_famille());
        // catmodel.setValue("IMI","indice de maitrise individuel",3);
        mychart.setModel(catmodel);
      }

      catmodel.setValue("IMG", "Indice de maitrise global", cotationMoel.getIMGParPoste(poste));
      mychart.setModel(catmodel);

      ChartEngine d = mychart.getEngine();
      image = d.drawChart(mychart);
    } else {
      message.setVisible(true);
      message.setValue("Pas de résultat à afficher");
      mychart.setVisible(false);
    }
  }
示例#3
0
 private void doCheckRights() {
   UserWorkspace workspace = getUserWorkspace();
   //        String role = getUserWorkspace().getUserSession().getEmployeeRole();
   //        if (((getUserWorkspace().getUserSession().getOrganizationid() == 1176)
   //                || (getUserWorkspace().getUserSession().getOrganizationid() == 1413))
   //                &&
   // ((getUserWorkspace().getUserSession().getJobPositionCode().equals("Assistant Manager"))
   //                ||
   // (getUserWorkspace().getUserSession().getJobPositionCode().equals("Analyst"))
   //                || (getUserWorkspace().getUserSession().getJobPositionCode().equals("POH
   // Assistant Manager")))) {
   if (getUserWorkspace().getUserSession().getEmployeeRole().contains(1532)) {
     label_prioritas.setVisible(true);
     radiogroup_Prioritas.setVisible(true);
     label_dampak.setVisible(true);
     radiogroup_Dampak.setVisible(true);
     label_pelaksana.setVisible(true);
     listbox_NamaPelaksana.setVisible(true);
     label_target.setVisible(true);
     intbox_target.setVisible(true);
     label_hari.setVisible(true);
   } else {
     label_prioritas.setVisible(false);
     radiogroup_Prioritas.setVisible(false);
     label_dampak.setVisible(false);
     radiogroup_Dampak.setVisible(false);
     label_pelaksana.setVisible(false);
     listbox_NamaPelaksana.setVisible(false);
     label_target.setVisible(false);
     intbox_target.setVisible(false);
     label_hari.setVisible(false);
   }
 }
示例#4
0
 public void limpiarCampos() {
   TabConfigur configuracion = servicioConfiguracion.buscar(1);
   TabEmpresa empresa = servicioEmpresa.buscar(configuracion.getIdEmp());
   txtNumero.setValue(0);
   idEmpresa = empresa.getIDEmp();
   lblNombre.setValue(empresa.getNomEmp());
   lblDireccion.setValue(empresa.getDirEmp());
   lblFax.setValue(empresa.getFaxEmp());
   lblNit.setValue(empresa.getNitEmp());
   lblRif.setValue(empresa.getRifEmp());
   lblTelefono.setValue(empresa.getTelEmp());
   lblElaborado.setValue(nombreUsuarioSesion());
   lblAutorizado.setValue(configuracion.getAutoriza());
   lblRevisado.setValue(configuracion.getRevisa());
   clave = null;
   txtTotal.setValue(null);
   txtNumero.setValue(null);
   txtProveedor.setValue(null);
   lblProveedor.setValue("");
   buscadorClase.settearCampo(null);
   buscadorMoneda.settearCampo(null);
   buscadorTipo.settearCampo(null);
   listaDetalle.clear();
   ltbPedidos.getItems().clear();
   limpiarCamposItem();
 }
示例#5
0
 @AfterCompose
 public void init(@SelectorParam("#l14") Label l4, @SelectorParam("label") List<Label> labels) {
   for (int i = 0; i < labels.size(); i++) {
     labels.get(i).setValue("Init " + i);
   }
   l4.setValue(l4.getValue() + ":4");
 }
示例#6
0
 private void createLabel(Component container, String key, String value) {
   Hbox box = new Hbox();
   box.setParent(container);
   new Label(key + ": ").setParent(box);
   Label label = new Label(value != null ? value : "NULL");
   label.setClass(key);
   label.setParent(box);
 }
示例#7
0
 @NotifyChange("*")
 @Command
 public void cmd1(
     @SelectorParam("label") LinkedList<Label> labels, @SelectorParam("#l13") Label l3) {
   for (int i = 0; i < labels.size(); i++) {
     labels.get(i).setValue("Command " + i);
   }
   l3.setValue(l3.getValue() + ":3");
 }
 private Row addRow(Row row, Object value, Object... cellValue) {
   for (Object obj : cellValue) {
     if ((obj instanceof String) == true) {
       Label label = new Label();
       label.setValue((String) obj);
       label.setParent(row);
     } else if ((obj instanceof Component) == true) {
       ((Component) obj).setParent(row);
     }
   }
   return row;
 }
  @Listen("onSeleccion = #divCatalogoInforme")
  public void seleccion() {
    Informe informe = catalogo.objetoSeleccionadoDelCatalogo();
    ltbAcciones.getItems().clear();
    List<PlanAccion> planes = servicioPlanAccion.buscarPorInformeyTipo(informe, "normal");
    if (!planes.isEmpty()) {
      ltbAcciones.setModel(new ListModelList<PlanAccion>(planes));
      ltbAcciones.setCheckmark(false);
      ltbAcciones.setMultiple(false);
      ltbAcciones.setCheckmark(true);
      ltbAcciones.setMultiple(true);
      ltbAcciones.renderAll();
      if (ltbAcciones.getItemCount() != 0) {
        for (int i = 0; i < ltbAcciones.getItemCount(); i++) {
          Listitem listItem = ltbAcciones.getItemAtIndex(i);
          PlanAccion plan = listItem.getValue();
          if (plan.getEstado().equals("Finalizado")) listItem.setSelected(true);
          else listItem.setSelected(false);
        }
      }
    }

    ltbAccionesInspector.getItems().clear();
    List<PlanAccion> planes2 = servicioPlanAccion.buscarPorInformeyTipo(informe, "inspector");
    if (!planes.isEmpty()) {
      ltbAccionesInspector.setModel(new ListModelList<PlanAccion>(planes2));
      ltbAccionesInspector.setCheckmark(false);
      ltbAccionesInspector.setMultiple(false);
      ltbAccionesInspector.setCheckmark(true);
      ltbAccionesInspector.setMultiple(true);
      ltbAccionesInspector.renderAll();
      if (ltbAccionesInspector.getItemCount() != 0) {
        for (int i = 0; i < ltbAccionesInspector.getItemCount(); i++) {
          Listitem listItem = ltbAccionesInspector.getItemAtIndex(i);
          PlanAccion plan = listItem.getValue();
          if (plan.getEstado().equals("Finalizado")) listItem.setSelected(true);
          else listItem.setSelected(false);
        }
      }
    }
    lblOrdenamientos.setValue(informe.getOrdenamientos());
    lblFuncionario.setValue(informe.getFuncionario());
    if (informe.getFechaVisita() != null)
      lblFechaVisita.setValue(formatoFecha.format(informe.getFechaVisita()));
    lblCodigo.setValue(informe.getCodigo());
    lblCedula.setValue(informe.getPacienteA().getCedula());
    lblFicha.setValue(informe.getPacienteA().getFicha());
    lblNombre.setValue(
        informe.getPacienteA().getPrimerNombre()
            + " "
            + informe.getPacienteA().getPrimerApellido());
    lblDescripcion.setValue(informe.getFgad());
    lblTipo.setValue(informe.getFga());
    dtbFecha.setValue(informe.getFa());
    codigoInforme = informe.getIdInforme();
    catalogo.setParent(null);
  }
 @Listen("onChange = #txtRTF0005; onOK = #txtRTF0005")
 public boolean claveRTExiste() {
   if (txtSYF0005.getText().compareTo("") != 0) {
     if (servicioF0004.buscar(txtSYF0005.getValue(), txtRTF0005.getValue()) == null) {
       msj.mensajeAlerta(Mensaje.claveRTNoEsta);
       txtRTF0005.setFocus(true);
       lblDescripcionF0004.setValue("");
       return true;
     } else
       lblDescripcionF0004.setValue(
           servicioF0004.buscar(txtSYF0005.getValue(), txtRTF0005.getValue()).getDtdl01());
   }
   return false;
 }
示例#11
0
  @SuppressWarnings({"rawtypes", "unchecked"})
  @Override
  public void doAfterCompose(Window comp) throws Exception {
    super.doAfterCompose(comp);

    UserCredentialManager mgmt = UserCredentialManager.getIntance();
    NoteUser user = mgmt.getUser();
    StringBuilder sb = new StringBuilder();
    if (user != null) {
      if (user.getFirstName() != null) {
        sb.append(user.getFirstName() + " ");
      }
      if (user.getLastName() != null) {
        sb.append(user.getLastName() + " ");
      }
      sb.append("(" + user.getRole().name() + ")");
      loginUsrName.setValue(sb.toString());
    } else {
      loginUsrName.setValue("Guest");
    }

    /*
     * http://www.zkoss.org/zkdemo/input/wysiwyg_editor
     * http://books.zkoss.org/wiki/ZK_Developer's_Reference/Event_Handling/Event_Queues
     */
    // editor.setCustomConfigurationsPath("/js/ckeditorcfg.js");
    // editor.setToolbar("Full");

    EventQueues.lookup("myqueue1", EventQueues.SESSION, true)
        .subscribe(
            new EventListener() {

              public void onEvent(Event evt) {
                if (!"onTopicInit".equals(evt.getName())) {
                  return;
                }
                TopicItem item = (TopicItem) evt.getData();
                log.info("I've got this!! " + item.getId());

                currentNodeId = item.getId();
                NoteNode node = noteService.findTopic(currentNodeId);
                notePath.setValue(node.getPath());
                editor.setValue(node.getText());
              }
            });

    List<NoteNode> list = noteService.findAllTopicsByUser(user.getId());
    filterbox.setModel(new SimpleListModel(list.toArray()));
  }
    protected Div createWelcomePanel() {
      final Div welcomePanel = new Div();
      welcomePanel.setStyle("text-align: left; padding: 20px 8px 20px 8px;");
      welcomePanel.setSclass("z-groupbox-hm welcome_group");

      final Div labelContainer = new Div();
      final Label label = new Label(Labels.getLabel("liveedit.choose.site"));
      label.setStyle("font-weight: bold");
      label.setParent(labelContainer);
      welcomePanel.appendChild(labelContainer);
      final Div siteContainer = new Div();
      injectSites(siteContainer);
      welcomePanel.appendChild(siteContainer);
      return welcomePanel;
    }
  void modifierCompte() {
    try {
      Compte compte = compteManager.get(Long.parseLong(idCompte.getValue()));
      compte.setNom(nom.getValue());
      compte.setSolde(solde.getValue().floatValue());
      compte.setSoldeReel(soldeReel.getValue().floatValue());
      compte.setSoldePrevisionnel(soldePrevisionnel.getValue().floatValue());

      compteManager.update(compte);

      for (Object object :
          self.getDesktop()
              .getPage("mainPage")
              .getFellow("contentNiv2")
              .getFellow("contentNiv3")
              .getFellows()) {
        System.out.println("fellow : " + object.toString() + " - " + object.getClass().getName());
      }
      List<Compte> listCompte = compteManager.getAll();
      ListModelList listModelList = new ListModelList();
      listModelList.addAll(listCompte);

      ((Listbox)
              self.getDesktop()
                  .getPage("mainPage")
                  .getFellow("contentNiv2")
                  .getFellow("contentNiv3")
                  .getFellow("main")
                  .getFellow("list"))
          .setModel(listModelList);
      win.detach();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 /**
  * 展示修改人数.
  *
  * @param ordOrder
  */
 public void showTotalQuantity(List<OrdOrderItemMeta> orderItemMetas) {
   long child = 0;
   long adult = 0;
   long totalPrice = 0;
   OrdOrder ordOrder =
       orderServiceProxy.queryOrdOrderByOrderId(orderItemMetas.get(0).getOrderId());
   for (OrdOrderItemMeta orderItemMeta : orderItemMetas) {
     adult += orderItemMeta.getTotalAdultQuantity();
     child += orderItemMeta.getTotalChildQuantity();
     long price = 0;
     for (OrdOrderItemProd ordOrderItemProd : ordOrder.getOrdOrderItemProds()) {
       if (ordOrderItemProd.getOrderItemProdId().equals(orderItemMeta.getOrderItemId())) {
         price = ordOrderItemProd.getPrice();
         break;
       }
     }
     totalPrice += price * orderItemMeta.getQuantity();
   }
   showTotalQuantity.setValue(
       "总人数:" + (child + adult) + "            (成人" + adult + " 儿童" + child + ")");
   passPortInfo.setAdult(adult);
   passPortInfo.setChild(child);
   passPortInfo.setPrice(totalPrice);
   passPortInfo.setPriceYuan(String.valueOf((totalPrice / 100)));
   this.showTotalPrice.setValue(passPortInfo.getPriceYuan());
 }
示例#15
0
 @Listen("onSeleccion = #divCatalogoProveedor")
 public void seleccion() {
   TabProveedore f0004 = catalogoProveedor.objetoSeleccionadoDelCatalogo();
   txtProveedor.setValue(f0004.getIDPro());
   lblProveedor.setValue(f0004.getNomPro());
   catalogoProveedor.setParent(null);
 }
    @Override
    public void render(Listitem item, Object data) throws Exception {

      ApplicationNews applicationNews = (ApplicationNews) data;

      Listcell lc;

      lc = new Listcell();
      Label lb = new Label();
      lb.setParent(lc);
      lb.setValue(ZksampleDateFormat.getDateFormater().format(applicationNews.getDate()));
      lc.setParent(item);

      lc = new Listcell(applicationNews.getText().toString());
      lc.setParent(item);

      item.setValue(data);
      // ComponentsCtrl.applyForward(item,
      // "onDoubleClick=onDoubleClicked");
    }
  @Override
  public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);

    GenericValue userLogin =
        (GenericValue) comp.getDesktop().getSession().getAttribute("userLogin");

    GenericDelegator delegator = (GenericDelegator) userLogin.getDelegator();
    if (delegator == null) GenericDelegator.getGenericDelegator("default");

    GenericValue person = userLogin.getRelatedOne("Person");

    Map<String, Object> allFields = person.getAllFields();

    int count = 0;

    Collection<Component> leftHalf = new LinkedList<Component>();
    Collection<Component> rightHalf = new LinkedList<Component>();
    Label label = null;
    Label labelDesc = null;
    for (String key : allFields.keySet()) {

      Object obj = allFields.get(key);
      label = new Label();
      labelDesc = new Label();
      labelDesc.setValue(key);
      label.setValue(obj != null ? obj.toString() : "");
      Hbox hbox = new Hbox(new Component[] {labelDesc, label});
      if (count % 2 == 0) {
        leftHalf.add(hbox);
      } else {
        rightHalf.add(hbox);
      }
      count++;
    }

    Vbox vbox_1 = new org.zkoss.zul.Vbox(leftHalf.toArray(new Component[leftHalf.size()]));
    Vbox vbox_2 = new org.zkoss.zul.Vbox(rightHalf.toArray(new Component[rightHalf.size()]));
    comp.appendChild(vbox_1);
    comp.appendChild(vbox_2);
  }
示例#18
0
  public void onCreate$div(Event event) {
    user = (Usuario) execution.getSession().getAttribute("usuario");

    if (user != null) {
      if (user.getPessoa() != null) {
        nomeUsuario.setValue("SEJA BEM VINDO(A) " + user.getPessoa().getNome().toUpperCase());
      } else {
        nomeUsuario.setValue("SEJA BEM VINDO(A) ADMINISTRADOR");
      }

      if (user.getPrivilegio() == 3) {
        turma.setVisible(false);
        matricularAluno.setVisible(false);
        alocarProfessor.setVisible(false);

        cadastroPessoa.setVisible(true);
        cadastrarAluno.setVisible(false);

        cadastroAcademico.setVisible(false);
        prof = (Professor) user.getPessoa();
      } else if (user.getPrivilegio() == 4) {
        pauta.setVisible(false);
        cadastroAcademico.setVisible(false);
        turma.setVisible(false);
        alocarProfessor.setVisible(false);

        cadastroPessoa.setVisible(true);
        professor.setVisible(false);

        resultado.setVisible(false);
        visualizarTurmas.setVisible(false);
        aluno = (Aluno) user.getPessoa();
      }
    } else {
      // if feito para verificar se existe algum usuario logado, se nao existir eh redirecionado
      // para o login
      Executions.sendRedirect("/");
      div.detach();
    }
  }
  @Listen("onSeleccion = #divCatalogoF0004")
  public void seleccion() {
    F0004 f0004 = catalogoF0004.objetoSeleccionadoDelCatalogo();

    switch (idBoton) {
      case "btnBuscarF0004":
        txtSYF0005.setValue(f0004.getId().getDtsy());
        txtRTF0005.setValue(f0004.getId().getDtrt());
        lblDescripcionF0004.setValue(
            servicioF0004.buscar(f0004.getId().getDtsy(), f0004.getId().getDtrt()).getDtdl01());
        break;
      case "btnBuscarF0004Filtro":
        lblSY.setValue(f0004.getId().getDtsy());
        lblRT.setValue(f0004.getId().getDtrt());
        lblF0004.setValue(f0004.getDtdl01());
        catalogo.actualizarLista(
            servicioF0005.buscarParaUDCOrdenados(f0004.getId().getDtsy(), f0004.getId().getDtrt()));
        break;
      default:
        break;
    }
    catalogoF0004.setParent(null);
  }
 public void limpiarCampos() {
   clave = null;
   txtDL01F0005.setValue("");
   txtSPHDF0005.setValue("");
   txtHRDCF0005.setValue("");
   txtRTF0005.setValue("");
   txtSYF0005.setValue("");
   txtDL02F0005.setValue("");
   txtKYF0005.setValue("");
   txtSYF0005.setFocus(true);
   lblDescripcionF0004.setValue("");
   catalogo.limpiarSeleccion();
   btnBuscarF0004.setVisible(true);
 }
示例#21
0
  /** show content when select an item in tree */
  @Listen("onTopicSelect=#notetreeList")
  public void showTopicContent(Event fe) {

    if (!(fe.getTarget() instanceof NoteTreeList)) {
      return;
    }

    NoteTreeList item = (NoteTreeList) fe.getTarget();
    currentNodeId = item.getCurrentItem().getId();

    NoteNode node = noteService.findTopic(currentNodeId);

    String text = node.getText();
    editor.setValue(text);
    notePath.setValue(node.getPath());
  }
示例#22
0
  @Listen("onSelect=#filterbox")
  // Zul page example: onSelect="searchBar.value=self.selectedItem.value.name; searchBar.close();"
  public void changeNote(Event fe) {

    if (!(fe.getTarget() instanceof Listbox)) {
      return;
    }

    Listitem item = ((Listbox) fe.getTarget()).getSelectedItem();

    NoteNode selectedNode = (NoteNode) item.getValue();
    currentNodeId = selectedNode.getId();
    notePath.setValue(selectedNode.getPath());
    editor.setValue(selectedNode.getText());

    EventQueues.lookup("myqueue2", EventQueues.SESSION, true)
        .publish(new Event("onSelectSearchItem", null, currentNodeId));
  }
 public void onCreate$preparacionesEmpleadoMttoWindow(Event event) throws Exception {
   logger.log(
       Level.INFO, "[PreparacionesEmpleadoMttoCtrl][onCreate$preparacionesEmpleadoMttoWindow]");
   try {
     doOnCreateCommon(this.preparacionesEmpleadoMttoWindow, event);
     MensajeMultilinea.doSetTemplate();
     planillaSelected = null;
     if (this.args.containsKey("planillaSelected")) {
       planillaSelected = (Planilla) this.args.get("planillaSelected");
       lblNombrePlanillaSelected.setValue(planillaSelected.getDescripcionPlanilla());
     }
     llenarDatosCampos();
     revisarEstadoComponentes();
     preparacionesEmpleadoMttoWindow.doModal();
   } catch (Exception e) {
     logger.log(Level.SEVERE, e.getLocalizedMessage());
     e.printStackTrace();
   }
 }
  @Command
  public void limpiar(Event evt) {
    cuentaCheques.clearErrorMessage();
    nombreCliente.clearErrorMessage();
    codigoBicEnvio.clearErrorMessage();
    codigoBicRecepcion.clearErrorMessage();
    cdContratoSicoco.clearErrorMessage();
    errorIva.clearErrorMessage();
    moneda.clearErrorMessage();

    cdContratoSicoco.setValue(null);
    cdContrato.setValue(null);
    cuentaCheques.setValue(null);
    moneda.setValue(null);
    monedaCbx.setValue(null);
    codigoBicRecepcion.setValue(null);
    codigoBicEnvio.setValue(null);
    nombreCliente.setValue(null);
    clienteAAA.setChecked(false);
    mensualidad.setChecked(false);
    anualidad.setChecked(false);
    cuentaActiva.setChecked(true);
    iva.setSelectedItem(null);

    filtroClienteAAA = "";
    filtroCodigoBicEnvio = "";
    filtroCodigoBicRecepcion = "";
    filtroContrato = "";
    filtroCuentaCheques = "";
    filtroIvaCbx = "";
    filtroMonedaCbx = "";
    filtroNombreCliente = "";

    cuentaCheques.setReadonly(false);
    fechaBaja.setVisible(false);
    fechaBajaLbl.setVisible(false);
    generaSicocoBtn.setVisible(false);
  }
 public void save() {
   sessionInfo.setAlternateTreatmentProviders((List<Physician>) selectedPhysiciansLb.getModel());
   sessionManager.save(sessionInfo);
   successLbl.setValue("Other treatment provider has been saved.");
 }
 public void onClick$searchLastNameBtn(MouseEvent event) {
   successLbl.setValue("");
   errLbl.setValue("");
   lastNameSearch();
 }
示例#27
0
 public void onRowComboChange() {
   Label l = (Label) page.getFellow("msg");
   l.setValue(l.getValue() + " on row combo change in generic forward composer");
 }
示例#28
0
 @Override
 public void doAfterCompose(Window comp) throws Exception {
   super.doAfterCompose(comp);
   label.setValue(s);
 }
 @Listen("onSelect = #personListbox")
 public void details() {
   Person selectedPerson = personListbox.getSelectedItem().getValue();
   detailsFirstName.setValue(selectedPerson.getFirstName());
   detailsYob.setValue("" + selectedPerson.getYob());
 }
  @SuppressWarnings("deprecation")
  public static void showSalaryHeadWindow(Event event, GenericValue gv)
      throws SuspendNotAllowedException, InterruptedException, GenericEntityException {

    Component approveClaimWindow = event.getTarget();
    GenericValue userLogin =
        (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("userLogin");
    GenericValue person =
        (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("person");

    String salaryHeadId = gv.getString("salaryHeadId");
    String hrName = gv.getString("hrName");
    String isCr = gv.getString("isCr");
    String salaryHeadTypeId = gv.getString("salaryHeadTypeId");
    String geoId = gv.getString("geoId");
    String isTaxable = gv.getString("isTaxable");
    String isMandatory = gv.getString("isMandatory");
    String currencyUomId = gv.getString("currencyUomId");
    String salaryComputationTypeId = gv.getString("salaryComputationTypeId");

    Window win =
        (Window)
            Executions.createComponents(
                "/zul/payRollManagement/updateSalaryHead.zul",
                null,
                UtilMisc.toMap("oldHrName", hrName));
    win.setTitle("Update Salary Head");
    GenericDelegator delegator =
        HrmsInfrastructure.getDelegator(); // GenericDelegator.getGenericDelegator("default");
    /*
     * EntityCondition condition = EntityCondition.makeCondition("enumTypeId",
     * EntityOperator.EQUALS, "CLAIM_TYPE");
     */
    EntityCondition currencyCondition =
        EntityCondition.makeCondition("uomTypeId", EntityOperator.EQUALS, "CURRENCY_MEASURE");

    Set<String> SalaryHeadTypeToDisplay = new HashSet();
    Set<String> currencyTypeToDisplay = new HashSet();
    Set<String> SalaryComputationTypeToDisplay = new HashSet();

    SalaryHeadTypeToDisplay.add("salaryHeadTypeId");
    SalaryHeadTypeToDisplay.add("description");

    currencyTypeToDisplay.add("uomId");
    currencyTypeToDisplay.add("description");

    SalaryComputationTypeToDisplay.add("salaryComputationTypeId");
    SalaryComputationTypeToDisplay.add("description");
    // =====================SalaryHeadType==============================
    List<GenericValue> salaryHeadType =
        delegator.findList("SalaryHeadType", null, SalaryHeadTypeToDisplay, null, null, false);
    salaryHeadType.add(0, null);
    SimpleListModel salaryHeadTypeList = new SimpleListModel(salaryHeadType);

    Listbox applySalaryHeadTypeListBox = (Listbox) win.getFellow("applySalaryHeadType");
    applySalaryHeadTypeListBox.setModel(salaryHeadTypeList);
    applySalaryHeadTypeListBox.setItemRenderer(new SalaryHeadTypeRenderer());

    for (int i = 1; i < salaryHeadType.size(); i++) {
      GenericValue IndividualsalaryHeadType = salaryHeadType.get(i);
      String itemValue = IndividualsalaryHeadType.getString("salaryHeadTypeId");
      if (itemValue.equals(salaryHeadTypeId)) {
        applySalaryHeadTypeListBox.setSelectedIndex(i);
        break;
      }
    }
    // =====================UOM===CURRENCY==============================
    List<GenericValue> currency =
        delegator.findList("Uom", currencyCondition, currencyTypeToDisplay, null, null, false);
    currency.add(0, null);
    SimpleListModel currencyList = new SimpleListModel(currency);

    Listbox currencyListBox = (Listbox) win.getFellow("applyCurrencyUomId");
    currencyListBox.setModel(currencyList);
    currencyListBox.setItemRenderer(new CurrencyRenderer());

    for (int i = 1; i < currency.size(); i++) {
      GenericValue IndividualCurrency = currency.get(i);
      String itemValue = IndividualCurrency.getString("uomId");
      if (itemValue.equals(currencyUomId)) {
        currencyListBox.setSelectedIndex(i);
        break;
      }
    }
    // =====================SalaryComputationType==============================
    List<GenericValue> SalaryComputationType =
        delegator.findList(
            "SalaryComputationType", null, SalaryComputationTypeToDisplay, null, null, false);
    SalaryComputationType.add(0, null);
    SimpleListModel SalaryComputationTypeList = new SimpleListModel(SalaryComputationType);

    Listbox SalaryComputationTypeListBox = (Listbox) win.getFellow("applyComputationType");
    SalaryComputationTypeListBox.setModel(SalaryComputationTypeList);
    SalaryComputationTypeListBox.setItemRenderer(new SalaryComputationTypeRenderer());

    for (int i = 1; i < SalaryComputationType.size(); i++) {
      GenericValue IndividualSalaryComputationType = SalaryComputationType.get(i);
      String itemValue = IndividualSalaryComputationType.getString("salaryComputationTypeId");
      if (itemValue.equals(salaryComputationTypeId)) {
        SalaryComputationTypeListBox.setSelectedIndex(i);
        break;
      }
    }
    // ========================================================================

    // salaryHeadName

    Label salaryHeadNameLabel = (Label) win.getFellow("salaryHeadName");
    salaryHeadNameLabel.setValue(salaryHeadId);

    Textbox salaryHeadIdTextbox = (Textbox) win.getFellow("salaryHeadId");
    salaryHeadIdTextbox.setValue(salaryHeadId);

    Textbox hrNameTextbox = (Textbox) win.getFellow("applyHrName");
    hrNameTextbox.setValue(hrName);

    String Credit = "";
    if (isCr.equals("Y")) Credit = "YES";
    else Credit = "NO";

    Listbox CreditListbox = (Listbox) win.getFellow("applyCredit");
    Listitem CreditListItem = new Listitem();

    for (int i = 1; i <= 2; i++) {
      CreditListItem = CreditListbox.getItemAtIndex(i);
      String itemValue = (String) CreditListItem.getValue();
      if (itemValue.equals(isCr)) {
        CreditListbox.setSelectedIndex(i);
        break;
      }
    }

    /*
     * Bandbox geoIdBandbox = (Bandbox) win.getFellow("searchPanel");
     * geoIdBandbox.setValue(geoId);
     */
    CountryBox geoIdBandbox = (CountryBox) win.getFellow("countrybandbox");
    geoIdBandbox.setValue(geoId);
    String Taxable = "";
    if (isTaxable.equals("Y")) Taxable = "YES";
    else Taxable = "NO";

    Listbox isTaxableListbox = (Listbox) win.getFellow("applyTaxable");
    Listitem isTaxableListItem = new Listitem();
    for (int i = 1; i <= 2; i++) {
      isTaxableListItem = isTaxableListbox.getItemAtIndex(i);
      String itemValue = (String) isTaxableListItem.getValue();
      if (itemValue.equals(isTaxable)) {
        isTaxableListbox.setSelectedIndex(i);
        break;
      }
    }

    String Mandatory = "";
    if (isMandatory.equals("Y")) Mandatory = "YES";
    else Mandatory = "NO";

    Listbox isMandatoryListbox = (Listbox) win.getFellow("applyMandatory");
    Listitem isMandatoryListItem = new Listitem();
    for (int i = 1; i <= 2; i++) {
      isMandatoryListItem = isMandatoryListbox.getItemAtIndex(i);
      String itemValue = (String) isMandatoryListItem.getValue();
      if (itemValue.equals(isMandatory)) {
        isMandatoryListbox.setSelectedIndex(i);
        break;
      }
    }

    // approveClaimWindow.detach();

    win.doModal();
  }