Package org.zkoss.zul

Examples of org.zkoss.zul.Combobox


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

    private void initParaCatalogueCB() {
        Combobox paraCatalogueCB = (Combobox) getFellow("paraCatalogue");
        List keyValueList = ParameterCache.getInstance().getCache("meta");


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


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

    public void query() {
        Combobox paraCatalogueTB = (Combobox) getFellow("paraCatalogue");
        String queryString = null;
        if (paraCatalogueTB.getSelectedItem() != null) {
            if (paraCatalogueTB.getSelectedItem().getValue() != null) {
                queryString = paraCatalogueTB.getSelectedItem().getValue().toString();
            } else {
                queryString = null;
            }
        }
        logger.debug("------------->>"+queryString);
View Full Code Here

                BeanUtils.copyProperties(var, obj);
            } 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());
View Full Code Here

        initBuildingListbox();
        refreshObjEntities();
    }

    public void selectMaintainEventTypeBySystem() {
        Combobox systemCB = (Combobox) getFellow("system");
        if (systemCB.getSelectedItem() != null) {

            // remove all in maintainEventTypeCB Combobox
            Combobox maintainEventTypeCB = (Combobox) getFellow("maintainEventType");
            int itemCount = maintainEventTypeCB.getItemCount();
            for (int i = 0; i < itemCount; i++) {
                maintainEventTypeCB.removeItemAt(0);
            }

            // getu the system type assigned
            String systemType = (String) systemCB.getSelectedItem().getValue();
View Full Code Here

    private void initBuildingListbox() {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        List buildingList = sess.selectList("Building.getAll");
        sess = null;

        Combobox buildingCB = (Combobox) getFellow("building");
        Iterator it = buildingList.iterator();
        while (it.hasNext()) {
            Building building = (Building) it.next();
            Comboitem item = new Comboitem();
            item.setValue(building);
View Full Code Here

    }

    public void objToView(Object obj) {
        RegularMaintainForm form = (RegularMaintainForm)obj;
       
        Combobox buildingCB = (Combobox) getFellow("building");
        if(form.getBuildingId() != null) {
            List items =  buildingCB.getItems();
            Iterator buildingItr = items.iterator();
            while(buildingItr.hasNext()) {
                Comboitem item = (Comboitem)buildingItr.next();
                Building building = (Building)item.getValue();

                if(building.getBuildingId().equals(form.getBuildingId())) {
                    buildingCB.setSelectedItem(item);
                }
            }
        }

        Combobox systemCB = (Combobox) getFellow("system");
        List items = systemCB.getItems();
        Iterator it = items.iterator();
        while(it.hasNext()) {
            Comboitem item = (Comboitem)it.next();
            if(item.getValue().toString().equals(form.getSystemType())) {
                systemCB.setSelectedItem(item);
            }
        }

        selectMaintainEventTypeBySystem();

        Combobox maintainEventTypeCB = (Combobox) getFellow("maintainEventType");
        if(form.getEventTypeId() != null) {
            List maintainEventTypeItems =  maintainEventTypeCB.getItems();
            Iterator maintainEventTypeItr = maintainEventTypeItems.iterator();
            while(maintainEventTypeItr.hasNext()) {
                Comboitem item = (Comboitem)maintainEventTypeItr.next();
                MaintainEventType maintainEventType = (MaintainEventType)item.getValue();
                if(maintainEventType.getEventTypeId().equals(form.getEventTypeId())) {
                    maintainEventTypeCB.setSelectedItem(item);
                }
            }
        }


        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()) {
                Comboitem item = (Comboitem)importantLevelItr.next();
                if(item.getValue().toString().equals(form.getImportantLevel())) {
                    importantLevelCB.setSelectedItem(item);
                }
            }
    }
View Full Code Here

                }
            }
    }

    public void query() {
        Combobox buildingCB = (Combobox) getFellow("building");
        if(buildingCB.getSelectedItem() == null) {
            this.showMsg("查詢前要設定建物設施名稱", "錯誤的操作");
            return;
        }
        Comboitem item = (Comboitem)buildingCB.getSelectedItem();
        Building building = (Building)item.getValue();
        Long buildingId = building.getBuildingId();

        Map para = new HashMap();
        para.put("buildingId", buildingId);
View Full Code Here

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

        Combobox buildingCB = (Combobox) getFellow("building");
        if (buildingCB.getSelectedItem() != null) {
            var.setBuilding((Building) buildingCB.getSelectedItem().getValue());
        }

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

        return var;
    }
View Full Code Here

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        List buildingList = sess.selectList("Building.getAll");
        sess = null;


        Combobox buildingCB = (Combobox) getFellow("building");
        Iterator it = buildingList.iterator();
        while (it.hasNext()) {
            Building building = (Building) it.next();
            Comboitem item = new Comboitem();
            item.setLabel(building.getBuildingName());
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Combobox

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.