public void visible_conRadio(String value) {
   if (value.equals("N")) {
     rowCual_otro.setVisible(false);
     tbxCual_otro.setReadonly(true);
     tbxCual_otro.setText("");
   }
   if (value.equals("S")) {
     rowCual_otro.setVisible(true);
     tbxCual_otro.setReadonly(false);
     tbxCual_otro.setText("");
     tbxCual_otro.focus();
   }
 }
예제 #2
0
  public void onClick$voltarPaginaListaFrequencia(Event e) {

    for (Intbox i : intbox) {
      i.setId(null);
      i.setVisible(false);
    }

    for (Row r : rowss) {
      r.setId(null);
      r.setVisible(false);
    }

    rowss.clear();
    rowss = new ArrayList<Row>();

    intbox.clear();
    intbox = new ArrayList<Intbox>();

    ListagemDisciplina.setSelectedItem(null);
    ListagemAluno.getItems().clear();

    janelaDisciplinaAluno.setVisible(false);
    JanelaFiltroParaListarDisciplina.setVisible(true);
    binder.loadComponent(indexFrequencia);
  }
  // Accion del formulario si es nuevo o consultar //
  public void accionForm(boolean sw, String accion) throws Exception {
    groupboxConsulta.setVisible(!sw);
    groupboxEditar.setVisible(sw);

    if (!accion.equalsIgnoreCase("registrar")) {
      buscarDatos();
      rowId_manual.setVisible(true);
      lbxTipo_manual.setDisabled(true);
      listboxProcedimientos.setVisible(true);
      listboxProcedimientos.invalidate();
    } else {
      // buscarDatos();
      limpiarDatos();
      rowId_manual.setVisible(false);
      lbxTipo_manual.setDisabled(false);
      listboxProcedimientos.setVisible(false);
      procedimientos_seleccionados.clear();
    }
    tbxAccion.setValue(accion);
  }
예제 #4
0
  public void onClick$adicionarFrequencias(Event e) throws InterruptedException {

    int id;
    for (Aluno a : Facade.getInstance().listarAlunoTurma(turmav.getId())) {
      for (Intbox i : intbox) {
        id = Integer.parseInt(i.getId());
        if (a.getId() == id) {
          Frequencia fr = new Frequencia();
          fr.setQtdAula(i.getValue());
          fr.setRegistroDeDisciplina(di);
          fr.setAluno(a);
          fr.setPeriodo("");
          Facade.getInstance().salvarFrequencia(fr);
        }
      }
    }

    Messagebox.show(
        "Frequências adicionadas com Sucesso!",
        "Sucesso!",
        Messagebox.OK,
        Messagebox.EXCLAMATION,
        new org.zkoss.zk.ui.event.EventListener() {
          public void onEvent(Event arg1) throws Exception {}
        });

    for (Intbox i : intbox) {
      i.setId(null);
      i.setVisible(false);
    }

    for (Row r : rowss) {
      r.setId(null);
      r.setVisible(false);
    }

    rowss.clear();
    rowss = new ArrayList<Row>();

    intbox.clear();
    intbox = new ArrayList<Intbox>();
    binder.loadComponent(indexFrequencia);
  }
예제 #5
0
  /**
   * *********************************************************** Create
   * ***********************************************************
   */
  @SuppressWarnings("rawtypes")
  private void onNodeTypeChanged() {
    ListModelList typeModel = (ListModelList) typeBox.getModel();
    Set selections = typeModel.getSelection();
    if (selections.isEmpty()) return;
    String selection = (String) selections.iterator().next();
    logger.info("Node type set to: " + selection);

    Map<String, String> ntd = GeneralUtil.getNodeDescriptionByLabel(ntds, selection);
    String nodeType = ntd.get("type");
    if (nodeType.equals(Constants.NODE_TYPE_USER)) {
      firstNameRow.setVisible(true);
      firstNameBox.setConstraint("no empty");
      lastNameRow.setVisible(true);
      lastNameBox.setConstraint("no empty");
      midNameRow.setVisible(true);
    } else {
      firstNameRow.setVisible(false);
      firstNameBox.setConstraint("");
      lastNameRow.setVisible(false);
      lastNameBox.setConstraint("");
      midNameRow.setVisible(false);
    }
  }
  public CreateProcessController(
      final MainController mainC, final HashMap<String, String> formats_ext)
      throws SuspendNotAllowedException, InterruptedException, ExceptionAllUsers, ExceptionDomains {
    this.mainC = mainC;

    this.createProcessW =
        (Window) Executions.createComponents("macros/editprocessdata.zul", null, null);
    this.createProcessW.setTitle("Create new process ");
    Rows rows =
        (Rows) this.createProcessW.getFirstChild().getFirstChild().getFirstChild().getNextSibling();
    Row processNameR = (Row) rows.getFirstChild();
    this.processNameT = (Textbox) processNameR.getFirstChild().getNextSibling();
    Row versionNameR = (Row) processNameR.getNextSibling();
    this.versionNumberT = (Textbox) versionNameR.getFirstChild().getNextSibling();
    Row domainR = (Row) versionNameR.getNextSibling();
    Row ownerR = (Row) domainR.getNextSibling();

    Row nativeTypesR = (Row) ownerR.getNextSibling();
    this.nativeTypesLB = (Listbox) nativeTypesR.getFirstChild().getNextSibling();

    Row rankingR = (Row) nativeTypesR.getNextSibling();
    Radiogroup rankingRG = (Radiogroup) rankingR.getFirstChild().getNextSibling();

    Row publicR = (Row) rankingR.getNextSibling();
    this.makePublicCb = (Checkbox) publicR.getFirstChild().getNextSibling();

    Row buttonsR = (Row) publicR.getNextSibling().getNextSibling();
    Div buttonsD = (Div) buttonsR.getFirstChild();
    Button okB = (Button) buttonsD.getFirstChild();
    Button cancelB = (Button) okB.getNextSibling();
    Button resetB = (Button) cancelB.getNextSibling();
    List<String> domains = this.mainC.getDomains();
    this.domainCB = new SelectDynamicListController(domains);
    this.domainCB.setReference(domains);
    this.domainCB.setAutodrop(true);
    this.domainCB.setWidth("85%");
    this.domainCB.setHeight("100%");
    this.domainCB.setAttribute("hflex", "1");
    domainR.appendChild(domainCB);
    List<String> usernames = this.mainC.getUsers();
    SelectDynamicListController ownerCB = new SelectDynamicListController(usernames);
    ownerCB.setReference(usernames);
    ownerCB.setAutodrop(true);
    ownerCB.setWidth("85%");
    ownerCB.setHeight("100%");
    ownerCB.setAttribute("hflex", "1");
    ownerR.appendChild(ownerCB);

    // set row visibility at creation time
    nativeTypesR.setVisible(true);
    versionNameR.setVisible(false);
    rankingR.setVisible(false);

    // default values
    ownerCB.setValue(UserSessionManager.getCurrentUser().getUsername());

    Set<String> extensions = formats_ext.keySet();
    List<String> sorted = CollectionUtil.asSortedList(extensions);

    Iterator<String> it = sorted.iterator();
    Listitem cbi;
    while (it.hasNext()) {
      cbi = new Listitem();
      this.nativeTypesLB.appendChild(cbi);
      cbi.setLabel(formats_ext.get(it.next()));

      if ("BPMN 2.0".compareTo(cbi.getLabel()) == 0) {
        cbi.setSelected(true);
      }
    }
    // empty fields
    reset();

    okB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            createProcess();
          }
        });
    this.createProcessW.addEventListener(
        "onOK",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            createProcess();
          }
        });
    cancelB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            cancel();
          }
        });
    resetB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            reset();
          }
        });
    this.createProcessW.doModal();
  }