Package org.zkoss.zul

Examples of org.zkoss.zul.Listitem


    logger.debug("Count items :" + this.listBoxCustomer.getItemCount());
    // for (Listitem lstItem : lstArr)
    for (final Object item : this.listBoxCustomer.getItems()) {
      logger.debug("item :" + item);
      if (item instanceof Listitem) {
        final Listitem lstItem = (Listitem) item;
        for (final Object cell : lstItem.getChildren()) {
          logger.debug("cell :" + cell);
          // CHILDREN COUNT is ALWAYS 1
          if (cell instanceof Listcell) {
            final Listcell listcell = (Listcell) cell;
View Full Code Here


  public void onCheckmark$listBoxCustomer(Event event) throws Exception {

    logger.info(event.getTarget().getClass().getName());

    final Listitem li = this.listBoxCustomer.getSelectedItem();

    // li.setCheckable(false);
    li.setStyle("color: black; background-color:#f3d973");
    this.listBoxCustomer.invalidate();

  }
View Full Code Here

   *
   * @param event
   */
  public void onDoubleClickedRightItem() {

    Listitem item = this.listBoxSingleRightSearch.getSelectedItem();

    if (item != null) {
      SecRight right = (SecRight) item.getAttribute("data");

      /* store the selected right */
      setRight(right);

      textbox_AddGroupRightDialog_RightName.setValue(right.getRigName());
 
View Full Code Here

    // validate password again
    usrPassword.getValue();
    usrPasswordRetype.getValue();

    /* if a language is selected get the object from the listbox */
    Listitem item = lbox_usrLocale.getSelectedItem();

    if (item != null) {
      ListModelList lml1 = (ListModelList) lbox_usrLocale.getListModel();
      Language lang = (Language) lml1.get(item.getIndex());
      anUser.setUsrLocale(lang.getLanLocale());
    }

    // save it to database
    try {
View Full Code Here

   * @throws Exception
   */
  public void onRoleItemDoubleClicked(Event event) throws Exception {

    // get the selected object
    Listitem item = listBoxSecRoles.getSelectedItem();

    if (item != null) {
      // CAST AND STORE THE SELECTED OBJECT
      SecRole aRole = (SecRole) item.getAttribute("data");

      showDetailView(aRole);
    }
  }
View Full Code Here

  public void onSelect$listBoxSecGroup(Event event) throws Exception {
    // public void onGroupItemClicked(Event event) throws Exception {

    // get the selected object
    Listitem item = this.listBoxSecGroup.getSelectedItem();

    // Casting
    SecGroup aGroup = (SecGroup) item.getAttribute("data");
    setSelectedGroup(aGroup);

    if (tab_SecGroupRight_AllRights.isSelected()) {
      filterTypeForShowingRights();
    } else if (tab_SecGroupRight_Details.isSelected()) {
View Full Code Here

  public void onClick$button_GroupRight_NewGroupRight(Event event) throws Exception {
    // logger.debug(event.toString());

    // get the selected object
    Listitem item = listBoxSecGroup.getSelectedItem();

    // CAST AND STORE THE SELECTED OBJECT
    SecGroup aGroup = (SecGroup) item.getAttribute("data");
    setSelectedGroup(aGroup);

    if (aGroup != null) {

      /*
 
View Full Code Here

   * @param event
   */
  public void onDoubleClicked(Event event) {

    if (listbox.getSelectedItem() != null) {
      Listitem li = listbox.getSelectedItem();
      Branche branche = (Branche) li.getAttribute("data");

      setBranche(branche);
      this.onClose();
    }
  }
View Full Code Here

    HibernateSearchObject<Customer> so = new HibernateSearchObject(Customer.class);

    if (StringUtils.isNotEmpty(kunNr.getValue())) {

      // get the search operator
      Listitem item = this.sortOperator_kunNr.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunNr", "%" + kunNr.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunNr", kunNr.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(kunMatchcode.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunMatchcode.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunMatchcode", "%" + kunMatchcode.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunMatchcode", kunMatchcode.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(kunName1.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunName1.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunName1", "%" + kunName1.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunName1", kunName1.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(this.kunName2.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunName2.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunName2", "%" + kunName2.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunName2", kunName2.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(this.kunOrt.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunOrt.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunOrt", "%" + kunOrt.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunOrt", kunOrt.getValue(), searchOpId));
        }
      }
    }

    if (this.kunBranche.getSelectedCount() > 0) {

      // check if it the default empty item
      Listitem itemB = kunBranche.getSelectedItem();
      Branche branche = (Branche) itemB.getAttribute("data");

      if (!StringUtils.isEmpty(branche.getBraBezeichnung())) {

        // get the search operator
        Listitem item = this.sortOperator_kunBranch.getSelectedItem();

        if (item != null) {
          int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

          if (searchOpId == Filter.OP_ILIKE) {
            so.addFilter(new Filter("branche", branche, searchOpId));
          } else if (searchOpId == -1) {
            // do nothing
View Full Code Here

  final class OnCloseListener implements EventListener {
    @Override
    public void onEvent(Event event) throws Exception {

      if (listbox.getSelectedItem() != null) {
        Listitem li = listbox.getSelectedItem();
        Branche branche = (Branche) li.getAttribute("data");

        setBranche(branche);
      }
      onClose();
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listitem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.