Package org.zkoss.zul

Examples of org.zkoss.zul.Combobox$Renderer


    }

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

        Combobox providerCB = (Combobox) getFellow("provider");
        Iterator it = providerCB.getItems().iterator();
        while (it.hasNext()) {

            Comboitem item = (Comboitem) it.next();
            Org o = (Org) item.getValue();
            if (o.getOrgId().equals(form.getProviderId())) {
                providerCB.setSelectedItem(item);
            }
        }

        Textbox serviceNameTB = (Textbox) getFellow("serviceName");
        Textbox serviceUrlTB = (Textbox) getFellow("serviceUrl");
        Textbox parameterDescriptionTB = (Textbox) getFellow("parameterDescription");
        Textbox serviceKeyTB = (Textbox) getFellow("serviceKey");

        serviceNameTB.setText(form.getServiceName());
        serviceUrlTB.setText(form.getServiceUrl());
        parameterDescriptionTB.setText(form.getParameterDescription());
        serviceKeyTB.setText(form.getServiceKey());


        Combobox connectFrequencyCB = (Combobox) getFellow("connectFrequency");
        Iterator cfItr = connectFrequencyCB.getItems().iterator();
        while (cfItr.hasNext()) {
            Comboitem item = (Comboitem) cfItr.next();
            String connectFrequencyValue = item.getValue().toString();
            if (connectFrequencyValue.equals(form.getConnectFrequency())) {
                connectFrequencyCB.setSelectedItem(item);
            }
        }

        Textbox serviceKeyPasswordTB = (Textbox) getFellow("serviceKeyPassword");
        serviceKeyPasswordTB.setText(form.getServiceKeyPassword());
View Full Code Here


            }
        }

         object.setOperateBy(operateBy);

        Combobox providerCB = (Combobox) getFellow("provider");
        object.setProvider((Org) providerCB.getSelectedItem().getValue());

        Textbox serviceNameTB = (Textbox) getFellow("serviceName");
        Textbox serviceUrlTB = (Textbox) getFellow("serviceUrl");
        Textbox parameterDescriptionTB = (Textbox) getFellow("parameterDescription");
        Textbox serviceKeyTB = (Textbox) getFellow("serviceKey");

        object.setServiceName(serviceNameTB.getText());
        object.setServiceUrl(serviceUrlTB.getText());
        object.setParameterDescription(parameterDescriptionTB.getText());
        object.setServiceKey(serviceKeyTB.getText());


        Combobox connectFrequencyCB = (Combobox) getFellow("connectFrequency");
        object.setConnectFrequency(
                connectFrequencyCB.getSelectedItem().getValue().toString());

        Textbox serviceKeyPasswordTB = (Textbox) getFellow("serviceKeyPassword");
        object.setServiceKeyPassword(serviceKeyPasswordTB.getText());

        return object;
View Full Code Here


    }

    private void initOrgIdCB() {
        Combobox orgIdCB = (Combobox) getFellow("orgId");
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        List keyValueList = sess.selectList("Org.getName_Id");
        sess = null;
        logger.debug("org CB size:" + keyValueList.size());
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

        accountTB.setText(var.getAccount());
        passwdTB.setText(var.getPasswd());
    }

    public void query() {
        Combobox orgIdCB = (Combobox) getFellow("orgId");
        Comboitem itemVar = orgIdCB.getSelectedItem();
        String queryString = null;
        Map para = new HashMap();

        logger.debug("--->itemVar: "+itemVar);
        if (itemVar != null) {
            queryString = orgIdCB.getSelectedItem().getLabel();
            para.put("orgName", queryString);
        } else {
            para.put("orgName", null);
        }

        refreshObjEntities(para);

        // empty all fields , except the query condition field
        UserForm emptyObj = new UserForm();
        objToView(emptyObj);

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

            if (queryString != null && queryString.equals(s.getOrgName())) {
                orgIdCB.setSelectedItem(item);
            }
        }

    }
View Full Code Here

                BeanUtils.copyProperties(var, obj);
            } catch (Exception iae) {
                iae.printStackTrace();
            }
        }
        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());

View Full Code Here

    public void refreshObjEntities() {
        refreshObjEntities("Para.getAll", objListRenderer);
    }

    private void initParaCatalogueCB() {
    Combobox paraCatalogueCB = (Combobox) getFellow("paraCatalogue");
    SqlSession sess = IBatisFactory.getInstance().getSqlSession();
    List keyValueList = sess.selectList("Para.getParaCatalogue");
    sess = null;

    logger.debug("para CB size:" + keyValueList.size());
View Full Code Here

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

    public void query() {
        Combobox paraCatalogueTB = (Combobox) getFellow("paraCatalogue");
        String  queryString= null;
        if (paraCatalogueTB.getSelectedItem() != null) {
            queryString = paraCatalogueTB.getSelectedItem().getValue().toString();
        }
       
        Map para = new HashMap();
        para.put("paraCatalogue", queryString);
        refreshObjEntities(para);
View Full Code Here

            }
        }

        obj.setOperateBy(operateBy);

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

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

View Full Code Here

    }

    public void objToView(Object obj) {
        Para var = (Para) 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(item.getValue().toString().equals(var.getParaCatalogue())) {
                paraCatalogueCB.setSelectedItem(item);
            }
           
        }
        paraNameTB.setText(var.getParaName());
        paraValueTB.setText(var.getParaValue());
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.