Package net.caece.pri.hibernate.vo

Examples of net.caece.pri.hibernate.vo.ServiceForm


        ServiceDao dao = new ServiceDao();
        add(dao, obj);
    }

    public void delete() {
        ServiceForm obj = (ServiceForm) objListbox.getSelectedItem().getValue();
        ServiceDao dao = new ServiceDao();
        delete(dao, obj);

        // empty all fields
        ServiceForm emptyObj = new ServiceForm();
        objToView(emptyObj);
    }
View Full Code Here


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

    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

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

    public void update() {
        ServiceForm obj = (ServiceForm) objListbox.getSelectedItem().getValue();
        ServiceDao dao = new ServiceDao();
        update(dao, obj);
    }
View Full Code Here

TOP

Related Classes of net.caece.pri.hibernate.vo.ServiceForm

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.