Examples of ProgramController


Examples of org.spw.controller.ProgramController

    /**
     * Getter for property programs.
     * @return Value of property programs.
     */
    public Option[] getPrograms() {
        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());
        }
View Full Code Here

Examples of org.spw.controller.ProgramController

    }
   
    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            ProgramController  ctrl = new ProgramController();
            Program program = (Program)list.getObject(rk);
            ctrl.delete(program);
            list.refreshList();
        }
       
        return null;
    }
View Full Code Here

Examples of org.spw.controller.ProgramController

        setList(aList);       
    }
   
    public void refreshList() {
        aList.clear();
        ProgramController ctrl = new ProgramController();
        aList.addAll(ctrl.getPrograms());
    }
View Full Code Here

Examples of org.spw.controller.ProgramController

        try {
            id = new Long(value);
        } catch (NumberFormatException ex) {
            throw new ConverterException("Incorrect id for Program[" + value +"]");
        }
        ProgramController ctrl = new ProgramController();
        return ctrl.read(id);
    }
View Full Code Here

Examples of org.spw.controller.ProgramController

        getSessionBean1().getProgram().setCountry(countryControler.getCountryByName((String) value));
    }
   
    public String buttonValidate_action() {
        // Persist the new object
        ProgramController ctrl = new ProgramController();
        Program object = getSessionBean1().getProgram();
        ctrl.update(object);
        return "success";
    }
View Full Code Here

Examples of org.spw.controller.ProgramController

        this.year = year;
        //check the fundraising of this year
        Fundraising fundraising = new FundraisingController().read(year);
        target = (fundraising != null)? fundraising.getTarget() : new BigDecimal(0);
       
        programs = new ProgramController().getProgramsYear(year);
        volunteersByMonth = new ArrayList[13];
        Calendar cal = Calendar.getInstance();
        for (Program program: programs) {
            for (VolunteerApplication application : program.getApplications()) {
                Volunteer volunteer = application.getVolunteer();
View Full Code Here

Examples of org.spw.controller.ProgramController

        getSessionBean1().getProgram().setCountry(countryControler.getCountryByName((String) value));
    }
   
    public String buttonValidate_action() {
        // Persist the new object
        ProgramController ctrl = new ProgramController();
        Program object = getSessionBean1().getProgram();
        ctrl.update(object);
        return "success";
    }
View Full Code Here

Examples of org.spw.controller.ProgramController

    /**
     * Test of toElement method, of class org.spw.volunteer.report.xml.VolunteerDetailsFundraisingXmlReport.
     */
    public void testToElement() throws Exception{
        System.out.println("toElement");
        ProgramController programCtrl = new ProgramController();
       
        // Create
        Volunteer volunteer = new Volunteer();
        volunteer.setIdContact(TEST_ID);
        volunteer.setFirstName(getName());
        volunteer.setLastName(getName());
        volunteer.setTypeVolunteer("Accepted");
        volunteer.setYearApplyingFor(1900);
       
        VolunteerApplication application = new VolunteerApplication();
        application.setIdApplication(TEST_ID);
        application.setProgram(programCtrl.getPrograms().get(0));
        application.setAcceptanceFeeReceived(new Date());
        volunteer.setApplication(application);
       
        for (int i=1; i < 5; i++) {
            Contribution contrib = new Contribution();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.