IUserView userView = (IUserView) session.getAttribute("UserView"); Integer degreeCurricularPlanID = null; if(request.getParameter("degreeCurricularPlanID") != null){ degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID); }
RequestUtils.getAndSetStringToRequest(request, "degreeCurricularPlanID");
    public ActionForward editDescriptionDegreeCurricularPlan(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException {        ActionErrors errors = new ActionErrors();        HttpSession session = request.getSession();        IUserView userView = (IUserView) session.getAttribute("UserView");        Integer degreeCurricularPlanID = null;        if(request.getParameter("degreeCurricularPlanID") != null){            degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID"));            request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);        }        Integer infoExecutionDegreeId = getFromRequest("infoExecutionDegreeID", request);        request.setAttribute("infoExecutionDegreeID", infoExecutionDegreeId);        Integer infoDegreeCurricularPlanId = getFromRequest("infoDegreeCurricularPlanID", request);        request.setAttribute("infoDegreeCurricularPlanID", infoDegreeCurricularPlanId);        DynaActionForm descriptionCurricularPlanForm = (DynaActionForm) form;        InfoDegreeCurricularPlan infoDegreeCurricularPlan = new InfoDegreeCurricularPlan();        infoDegreeCurricularPlan.setIdInternal(infoDegreeCurricularPlanId);        infoDegreeCurricularPlan.setDescription((String) descriptionCurricularPlanForm                .get("descriptionDegreeCurricularPlan"));        infoDegreeCurricularPlan.setDescriptionEn((String) descriptionCurricularPlanForm                .get("descriptionDegreeCurricularPlanEn"));        Object[] args = { infoDegreeCurricularPlan };        try {            infoDegreeCurricularPlan = (InfoDegreeCurricularPlan) ServiceManagerServiceFactory                    .executeService(userView, "EditDescriptionDegreeCurricularPlan", args);        } catch (NotAuthorizedException e) {            errors.add("notAuthorized", new ActionError("error.exception.notAuthorized2"));        } catch (NonExistingServiceException e) {            errors.add("noDegreeCurricularPlan", new ActionError(                    "message.nonExistingDegreeCurricularPlan"));        } catch (FenixServiceException e) {            if (e.getMessage().equals("message.nonExistingDegreeCurricularPlan")) {                errors.add("nonExistingDegreeCurricularPlan", new ActionError(                        "message.nonExistingDegreeCurricularPlan"));            } else {                e.printStackTrace();                throw new FenixActionException(e);            }        }        if (infoDegreeCurricularPlan == null) {            errors.add("error.impossibleEditDCPInfo", new ActionError("error.impossibleEditDCPInfo"));        }        if (!errors.isEmpty()) {            saveErrors(request, errors);            return (new ActionForward(mapping.getInput()));        }        //request.setAttribute("infoDegreeCurricularPlan",        // infoDegreeCurricularPlan);        request.setAttribute("infoDegreeID", infoDegreeCurricularPlan.getInfoDegree().getIdInternal());        return mapping.findForward("editOK");    }