if (request.getParameter("language") != null && request.getParameter("language").equals("English")) { return mapping.findForward("editCurriculumEn"); } return mapping.findForward("editCurriculum");
request.setAttribute("infoCurriculum", infoCurriculum);  if (request.getParameter("language") != null && request.getParameter("language").equals("English")) { return mapping.findForward("editCurriculumEn"); } return mapping.findForward("editCurriculum");
    public ActionForward prepareEditCurriculum(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException {        HttpSession session = request.getSession(false);        IUserView userView = getUserView(request);        Integer infoExecutionDegreeCode = getAndSetIntegerToRequest("infoExecutionDegreeCode", request);        Integer infoCurricularCourseCode = getAndSetIntegerToRequest("infoCurricularCourseCode", request);        getAndSetIntegerToRequest("degreeCurricularPlanID", request);                // check that this user can edit curricular course information        Boolean canEdit = new Boolean(false);        ActionErrors errors = new ActionErrors();        Object[] argsAuthorization = { infoExecutionDegreeCode, infoCurricularCourseCode,                userView.getUtilizador() };        try {            canEdit = (Boolean) ServiceUtils.executeService(null, "LoggedCoordinatorCanEdit",                    argsAuthorization);        } catch (NonExistingServiceException e) {            errors.add("chosenCurricularCourse", new ActionError(                    "error.coordinator.chosenCurricularCourse"));            saveErrors(request, errors);        } catch (FenixServiceException e) {            if (e.getMessage().equals("nullExecutionDegreeCode")) {                errors.add("nullExecutionDegreeCode", new ActionError(                        "error.coordinator.noExecutionDegree"));                saveErrors(request, errors);            } else if (e.getMessage().equals("nullUsername")) {                errors.add("nullUsername", new ActionError("error.coordinator.noUserView"));                saveErrors(request, errors);            } else if (e.getMessage().equals("nullCurricularCourseCode")) {                errors.add("nullCurricularCourseCode", new ActionError(                        "error.coordinator.noCurricularCourse"));                saveErrors(request, errors);            } else {                throw new FenixActionException();            }        }        if (!errors.isEmpty()) {            return mapping.findForward("degreeCurricularPlanManagement");        }        request.setAttribute("canEdit", String.valueOf(canEdit.booleanValue()));        // get curricular course information        InfoCurriculum infoCurriculum = null;        Object[] args = { infoExecutionDegreeCode, infoCurricularCourseCode };        try {            infoCurriculum = (InfoCurriculum) ServiceUtils.executeService(userView,                    "ReadCurrentCurriculumByCurricularCourseCode", args);        } catch (NonExistingServiceException e) {            errors.add("chosenCurricularCourse", new ActionError(                    "error.coordinator.chosenCurricularCourse"));            saveErrors(request, errors);        } catch (FenixServiceException e) {            if (e.getMessage().equals("nullCurricularCourse")) {                errors.add("nullCode", new ActionError("error.coordinator.noCurricularCourse"));                saveErrors(request, errors);            } else {                throw new FenixActionException(e);            }        }        if (infoCurriculum == null) {            errors.add("noCurriculum", new ActionError("error.coordinator.noCurriculum"));            saveErrors(request, errors);        }        if (!errors.isEmpty()) {            return mapping.findForward("degreeCurricularPlanManagement");        }        fillForm(form, infoCurriculum);        request.setAttribute("infoCurriculum", infoCurriculum);        if (request.getParameter("language") != null                && request.getParameter("language").equals("English")) {            return mapping.findForward("editCurriculumEn");        }        return mapping.findForward("editCurriculum");    }