Package org.zkoss.zul

Examples of org.zkoss.zul.Textbox$AuxInfo


            } catch (Exception iae) {
                iae.printStackTrace();
            }
        }

        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");

        var.setRequestBy(requestByTB.getText());
        if (requestAtDate.getValue() != null
                && requestAtTime.getValue() != null) {
            Timestamp requestAt = new Timestamp(requestAtDate.getValue().getTime());
            requestAt.setHours(requestAtTime.getValue().getHours());
            requestAt.setMinutes(requestAtTime.getValue().getMinutes());
            var.setRequestAt(requestAt);
        }
        var.setStatus(statusCB.getSelectedItem().getValue().toString());
        var.setRequestMobilePhone(requestMobilePhoneTB.getText());
        var.setUrgentLevel(urgentLevelCB.getSelectedItem().getValue().toString());

        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");

        var.setRequestMaintainNo(requestMaintainNoTB.getText());
        var.setBuilding((Building) buildingCB.getSelectedItem().getValue());
        var.setRequestReason(requestReasonTB.getText());
        if (firstResponseAtDate.getValue() != null
                && firstResponseAtTime.getValue() != null) {
            Timestamp firstResponseAt = new Timestamp(firstResponseAtDate.getValue().getTime());
            firstResponseAt.setHours(firstResponseAtTime.getValue().getHours());
            firstResponseAt.setMinutes(firstResponseAtTime.getValue().getMinutes());
            var.setFirstResponseAt(firstResponseAt);
        }


        var.setResponseMessage(responseMessageTB.getText());

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

        if (responseSolutionAtDate.getValue() != null
                && responseSolutionAtTime.getValue() != null) {
            Timestamp responseSolutionAt = new Timestamp(responseSolutionAtDate.getValue().getTime());
            responseSolutionAt.setHours(responseSolutionAtTime.getValue().getHours());
            responseSolutionAt.setMinutes(responseSolutionAtTime.getValue().getMinutes());
            var.setResponseSolutionAt(responseSolutionAt);
        }
        var.setSolutionMessage(solutionMessageTB.getText());

        return var;
    }
View Full Code Here


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

        Combobox orgIdCB = (Combobox) getFellow("orgId");
        Textbox userNameTB = (Textbox) getFellow("userName");
        Textbox accountTB = (Textbox) getFellow("account");
        Textbox passwdTB = (Textbox) getFellow("passwd");

        Iterator supplierIt = orgIdCB.getItems().iterator();
        while (supplierIt.hasNext()) {
            Comboitem item = (Comboitem) supplierIt.next();
            Org s = (Org) item.getValue();

            logger.debug("" + var.getOrgId() + ", " + s.getOrgId());
            if (var.getOrgId() != null && var.getOrgId() == s.getOrgId()) {
                orgIdCB.setSelectedItem(item);
            }
        }
        userNameTB.setText(var.getUserName());
        accountTB.setText(var.getAccount());
        passwdTB.setText(var.getPasswd());
    }
View Full Code Here

            }
        }
        var.setOperateBy(operateBy);

        Combobox orgIdCB = (Combobox) getFellow("orgId");
        Textbox userNameTB = (Textbox) getFellow("userName");
        Textbox accountTB = (Textbox) getFellow("account");
        Textbox passwdTB = (Textbox) getFellow("passwd");

        var.setOrg((Org) orgIdCB.getSelectedItem().getValue());
        var.setUserName(userNameTB.getText());
        var.setAccount(accountTB.getText());
        var.setPasswd(passwdTB.getText());


        return var;
    }
View Full Code Here

    }

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

        Textbox authNameTB = (Textbox) getFellow("authName");
        Textbox authDescTB = (Textbox) getFellow("authDescription");
        Radiogroup editable = (Radiogroup) getFellow("editable");

        authNameTB.setText(var.getAuthName());
        authDescTB.setText(var.getAuthDescription());

        Iterator it = editable.getItems().iterator();
        while (it.hasNext()) {
            Radio radio = (Radio) it.next();
            if (radio.getValue().equals(var.getEditable())) {
View Full Code Here

                e.printStackTrace();
            }
        }
        var.setOperateBy(operateBy);

        Textbox authNameTB = (Textbox) getFellow("authName");
        Textbox authTypeTB = (Textbox) getFellow("authType");
        Textbox unitIDTB = (Textbox) getFellow("unitId");
        Textbox authDescTB = (Textbox) getFellow("authDescription");
        Radiogroup editable = (Radiogroup) getFellow("editable");

        var.setAuthName(authNameTB.getText());
        var.setAuthType(authTypeTB.getText());
        var.setUnitId(unitIDTB.getText());
        var.setAuthDescription(authDescTB.getText());
        var.setEditable(editable.getSelectedItem().getValue());

        return var;
    }
View Full Code Here

        }

        user.setOperateBy(operateBy);

        Combobox orgIdCB = (Combobox) getFellow("OrgId");
        Textbox userNameTB = (Textbox) getFellow("UserDutyWinUserName");
        Textbox accountTB = (Textbox) getFellow("Account");
        Textbox passwdTB = (Textbox) getFellow("Passwd");

        user.setOrg((Org) orgIdCB.getSelectedItem().getValue());
        user.setUserName(userNameTB.getValue());
        user.setAccount(accountTB.getValue());
        user.setPasswd(passwdTB.getValue());

        return user;
    }
View Full Code Here

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

        Combobox orgCB = (Combobox) getFellow("OrgId");
        Textbox userNameTB = (Textbox) getFellow("UserDutyWinUserName");
        Textbox accountTB = (Textbox) getFellow("Account");
        Textbox passwdTB = (Textbox) getFellow("Passwd");

        Iterator orgCbIt = orgCB.getItems().iterator();
        while (orgCbIt.hasNext()) {
            Comboitem orgCbItem = (Comboitem) orgCbIt.next();
            Org org = (Org) orgCbItem.getValue();

            logger.debug("" + var.getOrgId() + ", " + org.getOrgId());
            if (var.getOrgId() != null && var.getOrgId() == org.getOrgId()) {
                orgCB.setSelectedItem(orgCbItem);
            }
        }
        userNameTB.setText(var.getUserName());
        accountTB.setText(var.getAccount());

        // B/C we only save md5 value, therefore , no need to show md5
        passwdTB.setText("");
    }
View Full Code Here

    public boolean validate() {
        boolean isValid = true;

        Combobox orgCB = (Combobox) this.getFellow("OrgId");
        Textbox userNameTB = (Textbox) this.getFellow("UserDutyWinUserName");
        Textbox accountTB = (Textbox) this.getFellow("Account");
        Textbox passwdTB = (Textbox) this.getFellow("Passwd");

        if (orgCB.getSelectedItem() == null
                || userNameTB.getText() == null
                || "".equals(userNameTB.getText())
                || accountTB.getText() == null
                || "".equals(accountTB.getText())
                || passwdTB.getText() == null
                || "".equals(passwdTB.getText())) {
            isValid = false;
            showMsg("請填寫所屬組織, 使用者名稱, 使用者帳號及使用者密碼", "必要的選項");
        }

        return isValid;
View Full Code Here

    //ck
    public void objToView(Object obj) {
        FunForm form = (FunForm) obj;

        Combobox serviceCB = (Combobox) getFellow("service");
        Textbox funNameTB = (Textbox) getFellow("FunName");
        Combobox bootFlagCB = (Combobox) getFellow("BootFlag");
        Combobox activeFlag = (Combobox) getFellow("ActiveFlag");

        Iterator ServiceCBIt = serviceCB.getItems().iterator();
        while (ServiceCBIt.hasNext()) {
            Comboitem item = (Comboitem) ServiceCBIt.next();
            if (((Service) item.getValue()).getServiceId().toString().equals(form.getServiceId().toString())) {
                serviceCB.setSelectedItem(item);
                form.setService((Service) item.getValue());
            }
        }

        funNameTB.setText(form.getFunName());
        Iterator bootFlagIt = bootFlagCB.getItems().iterator();
        while (bootFlagIt.hasNext()) {
            Comboitem item = (Comboitem) bootFlagIt.next();
            if (item.getValue().toString().equals(form.getBootFlag())) {
                bootFlagCB.setSelectedItem(item);
            }
        }
        Iterator activeFlagIt = activeFlag.getItems().iterator();
        while (activeFlagIt.hasNext()) {
            Comboitem item = (Comboitem) activeFlagIt.next();
            if (item.getValue().toString().equals(form.getActiveFlag())) {
                activeFlag.setSelectedItem(item);
            }
        }

        Textbox funPathTB = (Textbox) getFellow("FunPathTB");
        funPathTB.setText("");




        if ("Y".equals(form.getBootFlag())) {
            // if bootFlag is Yes, set the fun path
            funPathTB.setText(form.getFunPath());

            // if bootFlag is Yes, set the fun operations
            List operationsLists = ParaCache.getInstance().getByCatalogue("pri.Fun.operations");
            Iterator it = operationsLists.iterator();
            while (it.hasNext()) {
View Full Code Here

            }
        }
        var.setOperateBy(operateBy);

        Combobox ServiceCB = (Combobox) getFellow("service");
        Textbox FunNameTB = (Textbox) getFellow("FunName");
        Combobox BootFlag = (Combobox) getFellow("BootFlag");
        Combobox ActiveFlag = (Combobox) getFellow("ActiveFlag");



        Textbox FunPathTB = (Textbox) getFellow("FunPathTB");

        Service service = (Service) ServiceCB.getSelectedItem().getValue();
        var.setService(service);

        var.setFunName(FunNameTB.getText());
        var.setActiveFlag(ActiveFlag.getSelectedItem().getValue().toString());
        var.setBootFlag(BootFlag.getSelectedItem().getValue().toString());




        List operationsLists = ParaCache.getInstance().getByCatalogue("pri.Fun.operations");

        StringBuffer sb = new StringBuffer();
        Iterator it = operationsLists.iterator();

        int firstCount = 0;
        while (it.hasNext()) {
            Para para = (Para) it.next();
            Checkbox cb = (Checkbox) getFellow("checkbox_" + para.getParaName());
            if (cb.isChecked()) {
                if (firstCount != 0) {
                    sb.append(":");
                }
                sb.append(cb.getValue());
            }
            firstCount++;
        }
        var.setOperations(sb.toString());


        var.setFunPath(FunPathTB.getText());

        //internal parameters
        var.setFunType("W");
        var.setFunCode("FM-II");
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.