Package com.sun.rave.web.ui.model

Examples of com.sun.rave.web.ui.model.Option


        final ProgramController ctrl = new ProgramController();
        final List<Program> programs = ctrl.getPrograms();
        Option[] options = new Option[programs.size()];
        int i = 0;
        for (Program programField : programs) {
            options[i++] = new Option(programField, programField.toString());
        }
        return options;
    }
View Full Code Here


    public Option[] getPartnerships() {
        //lazy loading of the list of partnerships + option All
        if (partnerships == null) {
            partnerships = new Option[getApplicationBean1().getPartnerships().length + 1];
            partnerships[0] = new Option("", "All");
            for (int i = 1; i < partnerships.length; i++) {
                partnerships[i] = getApplicationBean1().getPartnerships()[i-1];
            }
        }
        return partnerships;
View Full Code Here

        // and tranfert the other to an array for the Edit page
        contactList.remove(getContact());
        Option[] contactOptions = new Option[contactList.size()];
        for (Contact contact : contactList) {
            contactOptions[i++] =
                    new Option(Long.toString(contact.getIdContact()),
                    contact.getName());
        }
        getSessionBean1().setListOptions(contactOptions);
    }
View Full Code Here

        // and tranfert the other to an array for the Edit page
        contactList.remove(getContact());
        Option[] contactOptions = new Option[contactList.size()];
        for (Contact contact : contactList) {
            contactOptions[i++] =
                    new Option(Long.toString(contact.getIdContact()),
                    contact.getName());
        }
        getSessionBean1().setListOptions(contactOptions);
    }
View Full Code Here

       
        int idx = list.size();
        if (noneInserted) idx++; //+1 if the "none" must be inserted
        Option[] options = new Option[idx];
        if (noneInserted){
            options[0] = new Option("", "None");
            idx = 1;
        } else {
            idx = 0;
        }
        for (OptionValue opt : list) {
            options[idx++] = new Option(opt.getOptionLabel());
        }
        return options;
    }
View Full Code Here

        CountryController ctrl = new CountryController();
        List<Country> list = ctrl.getCountries();
       
        int idx = list.size() + 1;
        Option[] options = new Option[idx];
        options[0] = new Option("", "None");
        idx = 1;
        for (Country opt : list) {
            options[idx++] = new Option(opt, opt.getCountryName());
        }
        return options;
    }
View Full Code Here

     */
    public Option[] getVolunteerPropertiesOption() {
        Option[] retValue = new Option[getVolunteerProperties().size()];
        int i = 0;
        for (PropertyDescriptor prop : volunteerProperties) {
            Option option = new Option(prop.getName());
            retValue[i++] = option;
        }
        return retValue;
    }
View Full Code Here

     */
    public Option[] getVolunteerApplicationPropertiesOption() {
        Option[] retValue = new Option[getVolunteerApplicationProperties().size()];
        int i = 0;
        for (PropertyDescriptor prop : applicationProperties) {
            Option option = new Option(prop.getName());
            retValue[i++] = option;
        }
        return retValue;
    }
View Full Code Here

    public Option[] getPartnerships() {
        //lazy loading of the list of partnerships + option All
        if (partnerships == null) {
            partnerships = new Option[getApplicationBean1().getPartnerships().length + 1];
            partnerships[0] = new Option("", "All");
            for (int i = 1; i < partnerships.length; i++) {
                partnerships[i] = getApplicationBean1().getPartnerships()[i-1];
            }
        }
        return partnerships;
View Full Code Here

        final ProgramController ctrl = new ProgramController();
        final List<Program> programs = ctrl.getPrograms();
        Option[] options = new Option[programs.size()];
        int i = 0;
        for (Program programField : programs) {
            options[i++] = new Option(programField, programField.toString());
        }
        return options;
    }
View Full Code Here

TOP

Related Classes of com.sun.rave.web.ui.model.Option

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.