Package org.zkoss.zul

Examples of org.zkoss.zul.Textbox$AuxInfo


                iae.printStackTrace();
            }
        }

        Radiogroup isEquipment = (Radiogroup) getFellow("isEquipment");
        Textbox equipmentNameTB = (Textbox) getFellow("equipmentName");
        Combobox supplierIdCB = (Combobox) getFellow("supplierId");
        Textbox pccCodeTB = (Textbox) getFellow("pccCode");
        Textbox venderCodeTB = (Textbox) getFellow("venderCode");

        obj.setIsEquipment(isEquipment.getSelectedItem().getValue());
        obj.setEquipmentName(equipmentNameTB.getText());
        obj.setSupplier((Supplier) supplierIdCB.getSelectedItem().getValue());
        obj.setPccCode(pccCodeTB.getText());
        obj.setVenderCode(venderCodeTB.getText());

        Textbox insideCodeTB = (Textbox) getFellow("insideCode");
        Combobox priorityCB = (Combobox) getFellow("priority");
        Doublebox latestPriceTB = (Doublebox) getFellow("latestPrice");
        Intbox inventoryAmountTB = (Intbox) getFellow("inventoryAmount");
        Combobox systemTypeCB = (Combobox) getFellow("system");
        obj.setInsideCode(insideCodeTB.getText());
        obj.setPriority(priorityCB.getSelectedItem().getValue().toString());
        obj.setLatestPrice(latestPriceTB.getValue());
        obj.setInventoryAmount(inventoryAmountTB.getValue());
        obj.setSystemType(systemTypeCB.getSelectedItem().getValue().toString());
View Full Code Here


    public void objToView(Object obj) {
        EquipmentForm var = (EquipmentForm) obj;

        Radiogroup isEquipment = (Radiogroup) getFellow("isEquipment");
        Textbox equipmentNameTB = (Textbox) getFellow("equipmentName");
        Combobox supplierIdCB = (Combobox) getFellow("supplierId");
        Textbox pccCodeTB = (Textbox) getFellow("pccCode");
        Textbox venderCodeTB = (Textbox) getFellow("venderCode");

        Iterator it = isEquipment.getItems().iterator();
        while (it.hasNext()) {
            Radio radio = (Radio) it.next();
            if (radio.getValue().equals(var.getIsEquipment())) {
                radio.setChecked(true);
            }
        }

        equipmentNameTB.setText(var.getEquipmentName());

        Iterator supplierIt = supplierIdCB.getItems().iterator();
        while (supplierIt.hasNext()) {
            Comboitem item = (Comboitem) supplierIt.next();
            Supplier s = (Supplier) item.getValue();
            if (var.getSupplierId() != null && var.getSupplierId() == s.getSupplierId()) {
                supplierIdCB.setSelectedItem(item);
            }
        }

        pccCodeTB.setText(var.getPccCode());
        venderCodeTB.setText(var.getVenderCode());

        Textbox insideCodeTB = (Textbox) getFellow("insideCode");
        Combobox priorityCB = (Combobox) getFellow("priority");
        Doublebox latestPriceTB = (Doublebox) getFellow("latestPrice");
        Intbox inventoryAmountTB = (Intbox) getFellow("inventoryAmount");
        Combobox systemTypeCB = (Combobox) getFellow("system");

        insideCodeTB.setText(var.getInsideCode());
        Iterator priorityIt = priorityCB.getItems().iterator();
        while (priorityIt.hasNext()) {
            Comboitem item = (Comboitem) priorityIt.next();

            String priorityStr = item.getValue().toString();
View Full Code Here

    public void objToView(Object obj) {
        MechanicForm form = (MechanicForm) obj;

        Radiogroup hasCitizenshipRG = (Radiogroup) getFellow("hasCitizenship");
        Textbox mechanicNameTB = (Textbox) getFellow("mechanicName");
        Textbox uniIdTB = (Textbox) getFellow("uniId");
        Combobox companyCB = (Combobox) getFellow("company");
        Radiogroup sexRG = (Radiogroup) getFellow("sex");

        Iterator it = hasCitizenshipRG.getItems().iterator();
        while (it.hasNext()) {
            Radio r = (Radio) it.next();
            if (r.getValue().equals(form.getHasCitizenship())) {
                r.setChecked(true);
            }
        }
        mechanicNameTB.setText(form.getMechanicName());
        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;
            }
          
        }
        if(!mechanicBelongToCompany){
            companyCB.setValue("please");
        }

       
        Iterator sexRGItr = sexRG.getItems().iterator();
        while (sexRGItr.hasNext()) {
            Radio r = (Radio) sexRGItr.next();
            if (r.getValue().equals(form.getSex())) {
                r.setChecked(true);
            }
        }


        Datebox birthdayDB = (Datebox) getFellow("birthday");
        Textbox homePhoneTB = (Textbox) getFellow("homePhone");
        Textbox mobileTB = (Textbox) getFellow("mobile");
        Textbox informPeopleTB = (Textbox) getFellow("informPeople");
        Textbox relationTB = (Textbox) getFellow("relation");

        birthdayDB.setValue(form.getBirthday());
        homePhoneTB.setText(form.getHomePhone());
        mobileTB.setText(form.getMobile());
        informPeopleTB.setText(form.getInformPeople());
        relationTB.setText(form.getRelation());

        Textbox informPhoneTB = (Textbox) getFellow("informPhone");
        Textbox deliveryZipTB = (Textbox) getFellow("deliveryZip");
        Textbox deliveryAddressTB = (Textbox) getFellow("deliveryAddress");
        Textbox billZipTB = (Textbox) getFellow("billZip");
        Textbox billAddressTB = (Textbox) getFellow("billAddress");

        informPhoneTB.setText(form.getInformPhone());
        deliveryZipTB.setText(form.getDeliveryZip());
        deliveryAddressTB.setText(form.getDeliveryAddress());
        billZipTB.setText(form.getBillZip());
        billAddressTB.setText(form.getBillAddress());

    }
View Full Code Here

        billAddressTB.setText(form.getBillAddress());

    }

    public void query() {
        Textbox mechanicNameTB = (Textbox) getFellow("mechanicName");
        String mechanicName = mechanicNameTB.getText();
        Map para = new HashMap();
        para.put("mechanicName", mechanicName);

        refreshObjEntities(para);
View Full Code Here

            }
        }


        Radiogroup hasCitizenshipRG = (Radiogroup) getFellow("hasCitizenship");
        Textbox mechanicNameTB = (Textbox) getFellow("mechanicName");
        Textbox uniIdTB = (Textbox) getFellow("uniId");
        Combobox companyCB = (Combobox) getFellow("company");
        Radiogroup sexRG = (Radiogroup) getFellow("sex");

        var.setHasCitizenship(
                hasCitizenshipRG.getSelectedItem().getValue());
        var.setMechanicName(mechanicNameTB.getText());
        var.setUniId(uniIdTB.getText());
        if (companyCB.getSelectedItem() != null) {
            var.setCompany((Org) companyCB.getSelectedItem().getValue());
        }
        var.setSex(sexRG.getSelectedItem().getValue());


        Datebox birthdayDB = (Datebox) getFellow("birthday");
        Textbox homePhoneTB = (Textbox) getFellow("homePhone");
        Textbox mobileTB = (Textbox) getFellow("mobile");
        Textbox informPeopleTB = (Textbox) getFellow("informPeople");
        Textbox relationTB = (Textbox) getFellow("relation");

        var.setBirthday(birthdayDB.getValue());
        var.setHomePhone(homePhoneTB.getText());
        var.setMobile(mobileTB.getText());
        var.setInformPeople(informPeopleTB.getText());
        var.setRelation(relationTB.getText());


        Textbox informPhoneTB = (Textbox) getFellow("informPhone");
        Textbox deliveryZipTB = (Textbox) getFellow("deliveryZip");
        Textbox deliveryAddressTB = (Textbox) getFellow("deliveryAddress");
        Textbox billZipTB = (Textbox) getFellow("billZip");
        Textbox billAddressTB = (Textbox) getFellow("billAddress");

        var.setInformPhone(informPhoneTB.getText());
        var.setDeliveryZip(deliveryZipTB.getText());
        var.setDeliveryAddress(deliveryAddressTB.getText());
        var.setBillZip(billZipTB.getText());
        var.setBillAddress(billAddressTB.getText());

        return var;
    }
View Full Code Here

    }

    public void objToView(Object obj) {
        MaintainEventType var = (MaintainEventType) obj;
        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);
            }
        }
       
        maintainEventTypeTB.setText(var.getMaintainEventType());

    }
View Full Code Here

                iae.printStackTrace();
            }
        }

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

        var.setSystemType(systemTypeCB.getSelectedItem().getValue().toString());
        var.setMaintainEventType(maintainEventTypeTB.getText());

        return var;
    }
View Full Code Here

        Supplier emptyObj = new Supplier();
        objToView(emptyObj);
    }

    public void query() {
        Textbox nameTB = (Textbox) getFellow("name");
        String queryString = nameTB.getText();

        Map para = new HashMap();
        para.put("name", queryString);
        refreshObjEntities(para);

        // empty all fields , except the query condition field
        Supplier emptyObj = new Supplier();
        objToView(emptyObj);
        nameTB.setText(queryString);
    }
View Full Code Here

    }

    public boolean validate() {
        boolean isValid = true;

        Textbox uniIdTB = (Textbox) getFellow("uniId");
        Textbox nameTB = (Textbox) getFellow("name");
        Textbox shortNameTB = (Textbox) getFellow("shortName");
        Textbox contactTB = (Textbox) getFellow("contact");
        Textbox officeTel1TB = (Textbox) getFellow("officeTel1");
        if (!checkRequired(uniIdTB, "統一編號")) {
            return false;
        }
        if (!checkRequired(nameTB, "公司名稱")) {
            return false;
        }
        if (!checkRequired(shortNameTB, "簡稱")) {
            return false;
        }
        if (!checkRequired(contactTB, "聯絡人")) {
            return false;
        }
        if (!checkRequired(officeTel1TB, "公司電話1")) {
            return false;
        }


        Textbox inChargeTB = (Textbox) getFellow("inCharge");
        Textbox regAddressZipTB = (Textbox) getFellow("regAddressZip");
        Textbox regAddressTB = (Textbox) getFellow("regAddress");
        Textbox docReceiverTB = (Textbox) getFellow("docReceiver");
        Textbox recAddressZipTB = (Textbox) getFellow("recAddressZip");
        if (!checkRequired(inChargeTB, "負責人")) {
            return false;
        }
        if (!checkRequired(regAddressZipTB, "登記地址 郵遞區號")) {
            return false;
        }
        if (!checkRequired(regAddressTB, "登記地址")) {
            return false;
        }
        if (!checkRequired(docReceiverTB, "收件人")) {
            return false;
        }
        if (!checkRequired(recAddressZipTB, "通訊地址 郵遞區號")) {
            return false;
        }


        Textbox recAddressTB = (Textbox) getFellow("recAddress");
        if (!checkRequired(recAddressTB, "通訊地址")) {
            return false;
        }

View Full Code Here

        } else {
            obj = new Supplier();
        }


        Textbox uniIdTB = (Textbox) getFellow("uniId");
        Textbox nameTB = (Textbox) getFellow("name");
        Textbox shortNameTB = (Textbox) getFellow("shortName");
        Textbox contactTB = (Textbox) getFellow("contact");
        Textbox officeTel1TB = (Textbox) getFellow("officeTel1");
        obj.setUniId(uniIdTB.getText());
        obj.setName(nameTB.getText());
        obj.setShortName(shortNameTB.getText());
        obj.setContact(contactTB.getText());
        obj.setOfficeTel1(officeTel1TB.getText());

        Textbox inChargeTB = (Textbox) getFellow("inCharge");
        Textbox regAddressZipTB = (Textbox) getFellow("regAddressZip");
        Textbox regAddressTB = (Textbox) getFellow("regAddress");
        Textbox docReceiverTB = (Textbox) getFellow("docReceiver");
        Textbox recAddressZipTB = (Textbox) getFellow("recAddressZip");
        obj.setInCharge(inChargeTB.getText());
        obj.setRegAddressZip(regAddressZipTB.getText());
        obj.setRegAddress(regAddressTB.getText());
        obj.setDocReceiver(docReceiverTB.getText());
        obj.setRecAddressZip(recAddressZipTB.getText());

        Textbox recAddressTB = (Textbox) getFellow("recAddress");
        obj.setRecAddress(recAddressTB.getText());

        // optional fields
        Textbox faxTelTB = (Textbox) getFellow("faxTel");
        Textbox contactMobileTB = (Textbox) getFellow("contactMobile");
        Textbox officeTel2TB = (Textbox) getFellow("officeTel2");
        Textbox contactEmailTB = (Textbox) getFellow("contactEmail");
        Intbox quotaTB = (Intbox) getFellow("quota");
        obj.setFaxTel(faxTelTB.getText());
        obj.setContactMobile(contactMobileTB.getText());
        obj.setOfficeTel2(officeTel2TB.getText());
        obj.setContactEmail(contactEmailTB.getText());
        if (!"".equals(quotaTB.getText())) {
            obj.setQuota(Integer.parseInt(quotaTB.getText()));
        }

        return obj;
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Textbox$AuxInfo

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.