Package org.zkoss.zul

Examples of org.zkoss.zul.Comboitem


        dao.update(buildingDocForm);
    }

    private Comboitem getSelectedIndex(Combobox cb, String value) {
        for (int j = 0; j < cb.getItemCount(); j++) {
            Comboitem item = cb.getItemAtIndex(j);
            if (value.equals(item.getValue().toString())) {
                return item;
            }
        }
        return null;
    }
View Full Code Here


        List paraList = ParaCache.getInstance().getByCatalogue(paraCatalogue);
        Combobox cb = (Combobox) getFellow(comboboxGetFellowName);
        Iterator it = paraList.iterator();
        while (it.hasNext()) {
            Para obj = (Para) it.next();
            Comboitem item = new Comboitem();
            item.setLabel(obj.getParaValue());
            item.setValue(obj.getParaName());
            item.setParent(cb);
        }
    }
View Full Code Here

    }

    protected void setSelectedBy(Combobox cb, String value) {
        Iterator it = cb.getItems().iterator();
        while (it.hasNext()) {
            Comboitem item = (Comboitem) it.next();
            String s = (String) item.getValue();
            if (s.equals(value)) {
                cb.setSelectedItem(item);
            }
        }
    }
View Full Code Here

/* package */ class ComboitemCollectionItem implements CollectionItemExt, java.io.Serializable {
  private static final long serialVersionUID = 200808191454L;

  public Component getComponentCollectionOwner(Component comp) {
    if (comp instanceof Comboitem) {
      final Comboitem item = (Comboitem) comp;
      return item.getParent();
    } else {
      throw new UiException(
          "Unsupported type for ComboitemCollectionItem: " + comp);
    }
  }
View Full Code Here

    }
  }

  public void setupBindingRenderer(Component comp, DataBinder binder) {
    if (comp instanceof Comboitem) {
      final Comboitem li = (Comboitem) comp;
      final Combobox cbbox = (Combobox) li.getParent();
      if (cbbox.getItemRenderer() == null) {
        cbbox.setItemRenderer(new BindingComboitemRenderer(li, binder));
      }
    }
  }
View Full Code Here

        Iterator it = keyValueList.iterator();

        while (it.hasNext()) {
            Org s = (Org) it.next();
            Comboitem item = new Comboitem();
            item.setValue(s);
            item.setLabel(s.getOrgName());
            item.setParent(companyCB);
        }

    }
View Full Code Here

        uniIdTB.setText(form.getUniId());

        boolean mechanicBelongToCompany = false;
        Iterator companyCBItr = companyCB.getItems().iterator();
        while (companyCBItr.hasNext()) {
            Comboitem item = (Comboitem) companyCBItr.next();
            Org varCompany = (Org) item.getValue();
            if (form.getCompanyId() != null
                    && varCompany.getOrgId().equals(form.getCompanyId())) {
                companyCB.setSelectedItem(item);
                form.setCompany(varCompany); // if has company, re-link it now
                mechanicBelongToCompany = true;
View Full Code Here

        Combobox systemTypeCB = (Combobox) getFellow("system");
        Textbox maintainEventTypeTB = (Textbox) getFellow("maintainEventType");

        Iterator stItr = systemTypeCB.getItems().iterator();
        while (stItr.hasNext()) {
            Comboitem item = (Comboitem) stItr.next();
            String s = (String) item.getValue();
            if (s.equals(var.getSystemType())) {
                systemTypeCB.setSelectedItem(item);
            }
        }
       
View Full Code Here

        }
        // re-set equipment combobox
        Iterator it = equipmentList.iterator();
        while (it.hasNext()) {
            EquipmentForm ef = (EquipmentForm) it.next();
            Comboitem item = new Comboitem();
            item.setValue(ef);
            item.setLabel(ef.getEquipmentId() + " - " + ef.getEquipmentName());
            item.setParent(equipmentCB);
        }
    }
View Full Code Here

        floorTB.setText(form.getFloor());
        regionTB.setText(form.getRegion());
        Iterator systemCBItr = systemCB.getItems().iterator();
        while (systemCBItr.hasNext()) {
            Comboitem item = (Comboitem) systemCBItr.next();
            if (item.getValue().toString().equals(form.getSystemType())) {
                systemCB.setSelectedItem(item);
            }
        }
        initEquipmentBySystem();

        Iterator equipmentCBItr = equipmentCB.getItems().iterator();
        while (equipmentCBItr.hasNext()) {
            Comboitem item = (Comboitem) equipmentCBItr.next();
            Equipment equ = (Equipment) item.getValue();
            if (equ.getEquipmentId().equals(form.getEquipmentId())) {
                equipmentCB.setSelectedItem(item);
            }
        }

        Textbox supplierNameTB = (Textbox) getFellow("supplierName");
        Combobox priorityCB = (Combobox) getFellow("priority");
        Textbox propertyCodeTB = (Textbox) getFellow("propertyCode");
        Textbox descriptionTB = (Textbox) getFellow("description");


        supplierNameTB.setText(form.getSupplierShortName());
        Iterator priorityCBItr = priorityCB.getItems().iterator();
        while (priorityCBItr.hasNext()) {
            Comboitem item = (Comboitem) priorityCBItr.next();
            if (item.getValue().toString().equals(form.getPriority())) {
                priorityCB.setSelectedItem(item);
            }
        }
        propertyCodeTB.setText(form.getPropertyCode());
        descriptionTB.setText(form.getDescription());
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Comboitem

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.