Package org.zkoss.zul

Examples of org.zkoss.zul.Radiogroup


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

        Radiogroup isEquipment = (Radiogroup) getFellow("isEquipment");
        Textbox equipmentNameTB = (Textbox) getFellow("equipmentName");
        Combobox supplierIdCB = (Combobox) getFellow("supplierId");
        Textbox pccCodeTB = (Textbox) getFellow("pccCode");
        Textbox venderCodeTB = (Textbox) getFellow("venderCode");

        obj.setIsEquipment(isEquipment.getSelectedItem().getValue());
        obj.setEquipmentName(equipmentNameTB.getText());
        obj.setSupplier((Supplier) supplierIdCB.getSelectedItem().getValue());
        obj.setPccCode(pccCodeTB.getText());
        obj.setVenderCode(venderCodeTB.getText());
View Full Code Here


    }

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

        Radiogroup isEquipment = (Radiogroup) getFellow("isEquipment");
        Textbox equipmentNameTB = (Textbox) getFellow("equipmentName");
        Combobox supplierIdCB = (Combobox) getFellow("supplierId");
        Textbox pccCodeTB = (Textbox) getFellow("pccCode");
        Textbox venderCodeTB = (Textbox) getFellow("venderCode");

        Iterator it = isEquipment.getItems().iterator();
        while (it.hasNext()) {
            Radio radio = (Radio) it.next();
            if (radio.getValue().equals(var.getIsEquipment())) {
                radio.setChecked(true);
            }
View Full Code Here

    }

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

        Radiogroup hasCitizenshipRG = (Radiogroup) getFellow("hasCitizenship");
        Textbox mechanicNameTB = (Textbox) getFellow("mechanicName");
        Textbox uniIdTB = (Textbox) getFellow("uniId");
        Combobox companyCB = (Combobox) getFellow("company");
        Radiogroup sexRG = (Radiogroup) getFellow("sex");

        Iterator it = hasCitizenshipRG.getItems().iterator();
        while (it.hasNext()) {
            Radio r = (Radio) it.next();
            if (r.getValue().equals(form.getHasCitizenship())) {
                r.setChecked(true);
            }
        }
        mechanicNameTB.setText(form.getMechanicName());
        uniIdTB.setText(form.getUniId());

        boolean mechanicBelongToCompany = false;
        Iterator companyCBItr = companyCB.getItems().iterator();
        while (companyCBItr.hasNext()) {
            Comboitem item = (Comboitem) companyCBItr.next();
            Org varCompany = (Org) item.getValue();
            if (form.getCompanyId() != null
                    && varCompany.getOrgId().equals(form.getCompanyId())) {
                companyCB.setSelectedItem(item);
                form.setCompany(varCompany); // if has company, re-link it now
                mechanicBelongToCompany = true;
            }
          
        }
        if(!mechanicBelongToCompany){
            companyCB.setValue("please");
        }

       
        Iterator sexRGItr = sexRG.getItems().iterator();
        while (sexRGItr.hasNext()) {
            Radio r = (Radio) sexRGItr.next();
            if (r.getValue().equals(form.getSex())) {
                r.setChecked(true);
            }
View Full Code Here

                iae.printStackTrace();
            }
        }


        Radiogroup hasCitizenshipRG = (Radiogroup) getFellow("hasCitizenship");
        Textbox mechanicNameTB = (Textbox) getFellow("mechanicName");
        Textbox uniIdTB = (Textbox) getFellow("uniId");
        Combobox companyCB = (Combobox) getFellow("company");
        Radiogroup sexRG = (Radiogroup) getFellow("sex");

        var.setHasCitizenship(
                hasCitizenshipRG.getSelectedItem().getValue());
        var.setMechanicName(mechanicNameTB.getText());
        var.setUniId(uniIdTB.getText());
        if (companyCB.getSelectedItem() != null) {
            var.setCompany((Org) companyCB.getSelectedItem().getValue());
        }
        var.setSex(sexRG.getSelectedItem().getValue());


        Datebox birthdayDB = (Datebox) getFellow("birthday");
        Textbox homePhoneTB = (Textbox) getFellow("homePhone");
        Textbox mobileTB = (Textbox) getFellow("mobile");
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())) {
                radio.setChecked(true);
            }
View Full Code Here

        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

        }
        return null;
    }

    public void selectRadioAllocationDate(Event event) {
        Radiogroup radiogroup = (Radiogroup) event.getTarget().getFellow("radioAllocationDate");
        startAllocationDate.setDisabled(radiogroup.getSelectedIndex() != 2);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Radiogroup

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.