executionPeriodsLabels.add(new LabelValueBean(labelExecutionPeriod, valueExecutionPeriod));
executionPeriodsLabels.add(new LabelValueBean(labelExecutionPeriod, labelExecutionPeriod));
    public ActionForward prepareEdit(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws FenixActionException, FenixFilterException {        IUserView userView = SessionUtils.getUserView(request);        DynaActionForm dynaForm = (DynaActionForm) form;        Integer degreeCurricularPlanId = new Integer(request.getParameter("degreeCurricularPlanId"));        Integer curricularCourseScopeId = new Integer(request.getParameter("curricularCourseScopeId"));        InfoCurricularCourseScope oldInfoCurricularCourseScope = null;        Object args[] = { curricularCourseScopeId };        try {            oldInfoCurricularCourseScope = (InfoCurricularCourseScope) ServiceUtils.executeService(                    userView, "ReadCurricularCourseScope", args);        } catch (NonExistingServiceException ex) {            throw new NonExistingActionException("message.nonExistingCurricularCourseScope", mapping                    .findForward("readCurricularCourse"));        } catch (FenixServiceException fenixServiceException) {            throw new FenixActionException(fenixServiceException.getMessage());        }        if (oldInfoCurricularCourseScope.getBeginDate() != null)            dynaForm.set("beginDate", Data.format2DayMonthYear(oldInfoCurricularCourseScope                    .getBeginDate().getTime(), "/"));        if(oldInfoCurricularCourseScope.getAnotation() != null)            dynaForm.set("anotation",oldInfoCurricularCourseScope.getAnotation() );        dynaForm                .set("branchId", oldInfoCurricularCourseScope.getInfoBranch().getIdInternal().toString());        dynaForm.set("curricularSemesterId", oldInfoCurricularCourseScope.getInfoCurricularSemester()                .getIdInternal().toString());        Object[] args1 = { degreeCurricularPlanId };        List result = null;        try {            result = (List) ServiceUtils.executeService(userView, "ReadBranchesByDegreeCurricularPlan",                    args1);        } catch (NonExistingServiceException ex) {            throw new NonExistingActionException("message.nonExistingDegreeCurricularPlan", mapping                    .findForward("readDegree"));        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        if (result == null)            throw new NonExistingActionException("message.insert.degreeCurricularCourseScope.error",                    mapping.findForward("readCurricularCourse"));        //	creation of bean of InfoBranches for use in jsp        List branchesList = new ArrayList();        InfoBranch infoBranch;        Iterator iter = result.iterator();        String label, value;        while (iter.hasNext()) {            infoBranch = (InfoBranch) iter.next();            value = infoBranch.getIdInternal().toString();            label = infoBranch.getCode() + " - " + infoBranch.getName();            branchesList.add(new LabelValueBean(label, value));        }        // obtain execution periods to show in jsp        List<InfoExecutionPeriod> infoExecutionPeriods = null;        try {            infoExecutionPeriods = (List) ServiceUtils.executeService(userView, "ReadExecutionPeriods",                    null);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        if (infoExecutionPeriods == null)            throw new NonExistingActionException("message.insert.executionPeriods.error", mapping                    .findForward("readCurricularCourse"));        List executionPeriodsLabels = new ArrayList();        String labelExecutionPeriod, valueExecutionPeriod;        for (final InfoExecutionPeriod infoExecutionPeriod : infoExecutionPeriods) {            valueExecutionPeriod = Data.format2DayMonthYear(infoExecutionPeriod.getBeginDate(), "/");            labelExecutionPeriod = Data.format2DayMonthYear(infoExecutionPeriod.getBeginDate(), "/");            executionPeriodsLabels.add(new LabelValueBean(labelExecutionPeriod, valueExecutionPeriod));        }        request.setAttribute("executionPeriodsLabels", executionPeriodsLabels);        request.setAttribute("branchesList", branchesList);        return mapping.findForward("editCurricularCourseScope");    }