if (scheduleing == null) { final ActionErrors actionErrors = new ActionErrors(); actionErrors.add("error.scheduling.not.defined", new ActionError("error.scheduling.not.defined")); saveErrors(request, actionErrors); final String path = StringAppender.append("/manageFinalDegreeWork.do?method=prepare&degreeCurricularPlanID=", degreeCurricularPlanID.toString(), "&executionDegreeOID=" + executionDegreeOID.toString()); final ActionForward actionForward = new ActionForward(path); return actionForward; }
    public ActionForward createNewFinalDegreeWorkProposal(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException,            FenixFilterException, FenixServiceException {        IUserView userView = SessionUtils.getUserView(request);        Integer degreeCurricularPlanID = null;        if (request.getParameter("degreeCurricularPlanID") != null) {            degreeCurricularPlanID = Integer.valueOf(request.getParameter("degreeCurricularPlanID"));            request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);        }        DynaActionForm dynaActionForm = (DynaActionForm) form;        Integer executionDegreeOID = Integer.valueOf((String) dynaActionForm.get("executionDegreeOID"));        request.setAttribute("executionDegreeOID", executionDegreeOID);        DynaActionForm finalWorkForm = (DynaActionForm) form;        finalWorkForm.set("degree", executionDegreeOID.toString());        final ExecutionDegree executionDegree = (ExecutionDegree) readDomainObject(request, ExecutionDegree.class, executionDegreeOID);        final Scheduleing scheduleing = executionDegree.getScheduling();        final List branches = new ArrayList();        for (final ExecutionDegree ed : scheduleing.getExecutionDegrees()) {            final DegreeCurricularPlan degreeCurricularPlan = ed.getDegreeCurricularPlan();            branches.addAll(CommonServiceRequests.getBranchesByDegreeCurricularPlan(userView, degreeCurricularPlan.getIdInternal()));        }//        List branches = CommonServiceRequests.getBranchesByDegreeCurricularPlan(userView,//                infoExecutionDegree.getInfoDegreeCurricularPlan().getIdInternal());        request.setAttribute("branches", branches);        request.setAttribute("finalDegreeWorkProposalStatusList", FinalDegreeWorkProposalStatus                .getLabelValueList());        return mapping.findForward("show-final-degree-work-proposal");    }