Package org.zkoss.zul

Examples of org.zkoss.zul.Combobox$Renderer


            }
        }

        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());
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
View Full Code Here

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        ServiceList = sess.selectList("Service.getServices");
        sess = null;

        // show the service
        Combobox serviceCB = (Combobox) getFellow("service");
        for (int index = 0; index < ServiceList.size(); index++) {
            Service service = (Service) ServiceList.get(index);
            Comboitem item = new Comboitem();
            item.setLabel(service.getServiceName());
            item.setValue(service);
View Full Code Here

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        activeFlagList = sess.selectList("Fun.getActiveFlag");
        bootFlagList = sess.selectList("Fun.getBootFlag");
        sess = null;

        Combobox activeFlagCb = (Combobox) getFellow("ActiveFlag");
        Iterator activeFlagIt = activeFlagList.iterator();
        while (activeFlagIt.hasNext()) {
            FunForm activeFlag = (FunForm) activeFlagIt.next();
            Comboitem activeFlagItem = new Comboitem();
            activeFlagItem.setValue(activeFlag.getActiveFlag());
            activeFlagItem.setLabel(activeFlag.getActiveFlagString());
            activeFlagItem.setParent(activeFlagCb);
        }

        Combobox bootFlagCb = (Combobox) getFellow("BootFlag");
        Iterator bootFlagIt = bootFlagList.iterator();
        while (bootFlagIt.hasNext()) {
            FunForm bootFlag = (FunForm) bootFlagIt.next();
            Comboitem bootFlagItem = new Comboitem();
            bootFlagItem.setValue(bootFlag.getBootFlag());
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("");
View Full Code Here

                iae.printStackTrace();
            }
        }
        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());



View Full Code Here

    public void objToView(Object obj) {
        Org org = (Org) obj;

        Textbox orgNameTB = (Textbox) getFellow("orgName");
        Combobox orgTypeCB = (Combobox) getFellow("orgType");
        Combobox orgPropertyCB = (Combobox) getFellow("orgProperty");

        orgNameTB.setText(org.getOrgName());
        setSelectedBy(orgTypeCB, org.getOrgType());
        setSelectedBy(orgPropertyCB, org.getOrgProperty());
View Full Code Here

        }

        var.setOperateBy(operateBy);

        Textbox orgNameTB = (Textbox) getFellow("orgName");
        Combobox orgTypeCB = (Combobox) getFellow("orgType");
        Combobox orgPropertyCB = (Combobox) getFellow("orgProperty");


        var.setOrgName(orgNameTB.getText());
        if (orgTypeCB.getSelectedItem() != null) {
            var.setOrgType(orgTypeCB.getSelectedItem().getValue().toString());
        }

        if (orgPropertyCB.getSelectedItem() != null) {
            var.setOrgProperty(orgPropertyCB.getSelectedItem().getValue().toString());
        }



        return var;
View Full Code Here

        initProvider();
        refreshObjEntities();
    }

    private void initProvider() {
        Combobox providerCB = (Combobox) getFellow("provider");
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        List keyValueList = sess.selectList("Org.getAllCompany");
        sess = null;

        Iterator it = keyValueList.iterator();
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Combobox$Renderer

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.