if (degreeCurricularPlanID == null) { degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); }
    public ActionForward prepareEnrollmentPrepareChooseAreas(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        super.createToken(request);        IUserView userView = SessionUtils.getUserView(request);        ActionErrors errors = new ActionErrors();        DynaValidatorForm enrollmentForm = (DynaValidatorForm) form;                Integer degreeCurricularPlanID = (Integer) enrollmentForm.get("degreeCurricularPlanID");        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);        Integer studentNumber = Integer.valueOf(request.getParameter("studentNumber"));        enrollmentForm.set("studentNumber", studentNumber.toString());        String specialization = request.getParameter("specializationArea");        String secondary = request.getParameter("secondaryArea");        maintainEnrollmentState(request, studentNumber);        Integer executionDegreeId = getExecutionDegree(request);        InfoAreas2Choose infoAreas2Choose = null;        Object[] args = { executionDegreeId, null, studentNumber };        try {            infoAreas2Choose = (InfoAreas2Choose) ServiceManagerServiceFactory.executeService(userView,                    "ReadSpecializationAndSecundaryAreasByStudent", args);        } catch (NotAuthorizedFilterException e) {            if (e.getMessage() != null) {                addAuthorizationErrors(errors, e);            } else {                errors.add("notauthorized", new ActionError("error.exception.notAuthorized"));            }        } catch (ExistingServiceException e) {            if (e.getMessage().equals("student")) {                errors.add("student", new ActionError("error.no.student.in.database", studentNumber));            } else if (e.getMessage().equals("studentCurricularPlan")) {                errors.add("studentCurricularPlan", new ActionError(                        "error.student.curricularPlan.nonExistent"));            }        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        if (!errors.isEmpty()) {            saveErrors(request, errors);            return mapping.findForward("beginTransaction");        }        if (specialization != null && specialization.length() > 0 && secondary != null                && secondary.length() > 0) {            enrollmentForm.set("specializationArea", Integer.valueOf(specialization));            enrollmentForm.set("secondaryArea", Integer.valueOf(secondary));        }        Collections.sort(infoAreas2Choose.getFinalSpecializationAreas(), new BeanComparator("name"));        Collections.sort(infoAreas2Choose.getFinalSecundaryAreas(), new BeanComparator("name"));        request.setAttribute("branches", infoAreas2Choose);        return mapping.findForward("prepareEnrollmentChooseAreas");    }