Package org.zkoss.zul

Examples of org.zkoss.zul.Textbox


    }

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

        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");
        uniIdTB.setText(var.getUniId());
        nameTB.setText(var.getName());
        shortNameTB.setText(var.getShortName());
        contactTB.setText(var.getContact());
        officeTel1TB.setText(var.getOfficeTel1());

        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");
        inChargeTB.setText(var.getInCharge());
        regAddressZipTB.setText(var.getRegAddressZip());
        regAddressTB.setText(var.getRegAddress());
        docReceiverTB.setText(var.getDocReceiver());
        recAddressZipTB.setText(var.getRecAddressZip());

        Textbox recAddressTB = (Textbox) getFellow("recAddress");
        recAddressTB.setText(var.getRecAddress());

        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");
        faxTelTB.setText(var.getFaxTel());
        contactMobileTB.setText(var.getContactMobile());
        officeTel2TB.setText(var.getOfficeTel2());
        contactEmailTB.setText(var.getContactEmail());
        quotaTB.setText(var.getQuota() + "");

    }
View Full Code Here


    public void setSupplierInfo() {
        Combobox equipmentCB = (Combobox) getFellow("equipment");
        EquipmentForm ef = (EquipmentForm) equipmentCB.getSelectedItem().getValue();

        // show supplier name
        Textbox supplierNameTB = (Textbox) getFellow("supplierName");
        supplierNameTB.setText(ef.getSupplierName());

        // show priority
        Combobox priorityCB = (Combobox) getFellow("priority");
        for (int i = 0; i < priorityCB.getItemCount(); i++) {
            String priority = priorityCB.getItemAtIndex(i).getValue().toString();
            if (priority.equals(ef.getPriority())) {
                priorityCB.setSelectedIndex(i);
                break;
            }
        }

        Textbox propertyCodeTB = (Textbox) getFellow("propertyCode");
        propertyCodeTB.setText(ef.getInsideCode());


        // reset queryCount , when you use it as the query condition
        queryCount = 0;
        queryMatched = null;
View Full Code Here

    public void objToView(Object obj) {

        BomForm form = (BomForm) obj;

        Listbox buildingListbox = (Listbox) getFellow("buildingListbox");
        Textbox floorTB = (Textbox) getFellow("floor");
        Textbox regionTB = (Textbox) getFellow("region");
        Combobox systemCB = (Combobox) getFellow("system");
        Combobox equipmentCB = (Combobox) getFellow("equipment");

        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

        }

        Listbox buildingListbox = (Listbox) getFellow("buildingListbox");
        Combobox equipmentCB = (Combobox) getFellow("equipment");

        Textbox floorTB = (Textbox) getFellow("floor");
        Textbox regionTB = (Textbox) getFellow("region");
        Combobox priorityCB = (Combobox) getFellow("priority");
        Textbox propertyCodeTB = (Textbox) getFellow("propertyCode");
        Textbox descriptionTB = (Textbox) getFellow("description");

        Building building = (Building) buildingListbox.getSelectedItem().getValue();
        var.setBuilding(building);

        Equipment equ = (Equipment) equipmentCB.getSelectedItem().getValue();
        var.setEquipment(equ);

        var.setFloor(floorTB.getText());
        var.setRegion(regionTB.getText());
        var.setPriority(priorityCB.getSelectedItem().getValue().toString());
        var.setPropertyCode(propertyCodeTB.getText());
        var.setDescription(descriptionTB.getText());


        return var;
    }
View Full Code Here

            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        Combobox paraCatalogueCB = (Combobox) getFellow("paraCatalogue");
        Textbox paraNameTB = (Textbox) getFellow("paraName");
        Textbox paraValueTB = (Textbox) getFellow("paraValue");
        Textbox paraI18nTB = (Textbox) getFellow("paraI18n");

        var.setParaCatalogue(paraCatalogueCB.getSelectedItem().getValue().toString());
        var.setParaName(paraNameTB.getText());
        var.setParaValue(paraValueTB.getText());
        var.setParaI18n(paraI18nTB.getText());

        return var;
    }
View Full Code Here

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

        Combobox paraCatalogueCB = (Combobox) getFellow("paraCatalogue");
        Textbox paraNameTB = (Textbox) getFellow("paraName");
        Textbox paraValueTB = (Textbox) getFellow("paraValue");
        Textbox paraI18nTB = (Textbox) getFellow("paraI18n");


        List items = paraCatalogueCB.getItems();
        Iterator it = items.iterator();
        while (it.hasNext()) {
            Comboitem item = (Comboitem) it.next();
            if (var.getParaCatalogue().equals(item.getValue().toString())) {
                paraCatalogueCB.setSelectedItem(item);
            }

        }
        paraNameTB.setText(var.getParaName());
        paraValueTB.setText(var.getParaValue());
        paraI18nTB.setText(var.getParaI18n());

    }
View Full Code Here

                }
            }
        }


        Textbox maintainEventNameTB = (Textbox) getFellow("maintainEventName");
        maintainEventNameTB.setText(form.getMaintainEventName());

        Textbox regularSettingTB = (Textbox) getFellow("regularSetting");
        regularSettingTB.setText(form.getRegularSetting());

        Textbox noteTB = (Textbox) getFellow("note");
        noteTB.setText(form.getNote());

        Combobox importantLevelCB = (Combobox) getFellow("importantLevel");
        List importantLevelItems =  importantLevelCB.getItems();
            Iterator importantLevelItr = importantLevelItems.iterator();
            while(importantLevelItr.hasNext()) {
View Full Code Here

        Combobox maintainEventTypeCB = (Combobox) getFellow("maintainEventType");
        if (maintainEventTypeCB.getSelectedItem() != null) {
            var.setEventType((MaintainEventType) maintainEventTypeCB.getSelectedItem().getValue());
        }

        Textbox maintainEventNameTB = (Textbox) getFellow("maintainEventName");
        var.setMaintainEventName(maintainEventNameTB.getText());

        Textbox regularSettingTB = (Textbox) getFellow("regularSetting");
        var.setRegularSetting(regularSettingTB.getText());

        Textbox noteTB = (Textbox) getFellow("note");
        var.setNote(noteTB.getText());

        Combobox importantLevelCB = (Combobox) getFellow("importantLevel");
        if (importantLevelCB.getSelectedItem() != null) {
            var.setImportantLevel(importantLevelCB.getSelectedItem().getValue().toString());
        }
View Full Code Here

        return selected;
    }

    public boolean validate() {
        boolean isValid = true;
        Textbox buildingNameTextbox = (Textbox) this.getFellow("buildingNameTextbox");
        Textbox buildingZipTextbox = (Textbox) this.getFellow("buildingZipTextbox");
        Textbox buildingAddressTextbox = (Textbox) this.getFellow("buildingAddressTextbox");

        if (buildingNameTextbox.getText() == null
                || "".equals(buildingNameTextbox.getText())
                || buildingZipTextbox.getText() == null
                || "".equals(buildingZipTextbox.getText())
                || buildingAddressTextbox.getText() == null
                || "".equals(buildingAddressTextbox.getText())) {
            isValid = false;
            showMsg("請填寫建物設施名稱, 郵遞區號 及地址", "必要的選項");
        }

        return isValid;
View Full Code Here

    }

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

        Textbox requestByTB = (Textbox) getFellow("requestBy");
        Datebox requestAtDate = (Datebox) getFellow("requestAtDate");
        Timebox requestAtTime = (Timebox) getFellow("requestAtTime");
        Combobox statusCB = (Combobox) getFellow("status");
        Textbox requestMobilePhoneTB = (Textbox) getFellow("requestMobilePhone");
        Combobox urgentLevelCB = (Combobox) getFellow("urgentLevel");

        requestByTB.setText(form.getRequestBy());
        requestAtDate.setValue(form.getRequestAt());
        requestAtTime.setValue(form.getRequestAt());
        Iterator statusCBItr = statusCB.getItems().iterator();
        while (statusCBItr.hasNext()) {
            Comboitem item = (Comboitem) statusCBItr.next();
            if (item.getValue().toString().equals(form.getStatus())) {
                statusCB.setSelectedItem(item);
            }
        }
        requestMobilePhoneTB.setText(form.getRequestMobilePhone());

        Textbox requestMaintainNoTB = (Textbox) getFellow("requestMaintainNo");
        Combobox buildingCB = (Combobox) getFellow("building");
        Textbox requestReasonTB = (Textbox) getFellow("requestReason");
        Datebox firstResponseAtDate = (Datebox) getFellow("firstResponseAtDate");
        Timebox firstResponseAtTime = (Timebox) getFellow("firstResponseAtTime");
        Textbox responseMessageTB = (Textbox) getFellow("responseMessage");

        requestMaintainNoTB.setText(form.getRequestMaintainNo());
        Iterator buildingCBItr = buildingCB.getItems().iterator();
        while (buildingCBItr.hasNext()) {
            Comboitem item = (Comboitem) buildingCBItr.next();
            Building building = (Building) item.getValue();
            if (building.getBuildingId().toString().equals(form.getBuildingId().toString())) {
                buildingCB.setSelectedItem(item);
            }
        }
        requestReasonTB.setText(form.getRequestReason());
        firstResponseAtDate.setValue(form.getFirstResponseAt());
        firstResponseAtTime.setValue(form.getFirstResponseAt());
        responseMessageTB.setText(form.getResponseMessage());

        Datebox responseSolutionAtDate = (Datebox) getFellow("responseSolutionAtDate");
        Timebox responseSolutionAtTime = (Timebox) getFellow("responseSolutionAtTime");
        Textbox solutionMessageTB = (Textbox) getFellow("solutionMessage");

        responseSolutionAtDate.setValue(form.getResponseSolutionAt());
        responseSolutionAtTime.setValue(form.getResponseSolutionAt());
        solutionMessageTB.setText(form.getSolutionMessage());



    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Textbox

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.