Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);
Integer degreeCurricularPlanID = null; if(request.getParameter("degreeCurricularPlanID") != null){ degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID); }
    public ActionForward viewFinalDegreeWorkProposal(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException {                String finalDegreeWorkProposalOIDString = request.getParameter("finalDegreeWorkProposalOID");        Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID"));        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);                if (finalDegreeWorkProposalOIDString != null                && StringUtils.isNumeric(finalDegreeWorkProposalOIDString)) {            IUserView userView = SessionUtils.getUserView(request);            Object args[] = { new Integer(finalDegreeWorkProposalOIDString) };            try {                InfoProposal infoProposal = (InfoProposal) ServiceUtils.executeService(userView,                        "ReadFinalDegreeWorkProposal", args);                if (infoProposal != null) {                    DynaActionForm finalWorkForm = (DynaActionForm) form;                    if (infoProposal.getIdInternal() != null) {                        finalWorkForm.set("idInternal", infoProposal.getIdInternal().toString());                    }                    finalWorkForm.set("title", infoProposal.getTitle());                    if (infoProposal.getOrientatorsCreditsPercentage() != null) {                        finalWorkForm.set("responsibleCreditsPercentage", infoProposal                                .getOrientatorsCreditsPercentage().toString());                    }                    if (infoProposal.getCoorientatorsCreditsPercentage() != null) {                        finalWorkForm.set("coResponsibleCreditsPercentage", infoProposal                                .getCoorientatorsCreditsPercentage().toString());                    }                    finalWorkForm.set("companionName", infoProposal.getCompanionName());                    finalWorkForm.set("companionMail", infoProposal.getCompanionMail());                    if (infoProposal.getCompanionPhone() != null) {                        finalWorkForm.set("companionPhone", infoProposal.getCompanionPhone().toString());                    }                    finalWorkForm.set("framing", infoProposal.getFraming());                    finalWorkForm.set("objectives", infoProposal.getObjectives());                    finalWorkForm.set("description", infoProposal.getDescription());                    finalWorkForm.set("requirements", infoProposal.getRequirements());                    finalWorkForm.set("deliverable", infoProposal.getDeliverable());                    finalWorkForm.set("url", infoProposal.getUrl());                    if (infoProposal.getMaximumNumberOfGroupElements() != null) {                        finalWorkForm.set("maximumNumberOfGroupElements", infoProposal                                .getMaximumNumberOfGroupElements().toString());                    }                    if (infoProposal.getMinimumNumberOfGroupElements() != null) {                        finalWorkForm.set("minimumNumberOfGroupElements", infoProposal                                .getMinimumNumberOfGroupElements().toString());                    }                    if (infoProposal.getDegreeType() != null                            && infoProposal.getDegreeType().getTipoCurso() != null) {                        finalWorkForm.set("degreeType", infoProposal.getDegreeType().getTipoCurso()                                .toString());                    }                    finalWorkForm.set("observations", infoProposal.getObservations());                    finalWorkForm.set("location", infoProposal.getLocation());                    finalWorkForm.set("companyAdress", infoProposal.getCompanyAdress());                    finalWorkForm.set("companyName", infoProposal.getCompanyName());                    if (infoProposal.getOrientator() != null                            && infoProposal.getOrientator().getIdInternal() != null) {                        finalWorkForm.set("orientatorOID", infoProposal.getOrientator().getIdInternal()                                .toString());                        finalWorkForm.set("responsableTeacherNumber", infoProposal.getOrientator()                                .getTeacherNumber().toString());                        finalWorkForm.set("responsableTeacherName", infoProposal.getOrientator()                                .getInfoPerson().getNome());                    }                    if (infoProposal.getCoorientator() != null                            && infoProposal.getCoorientator().getIdInternal() != null) {                        finalWorkForm.set("coorientatorOID", infoProposal.getCoorientator()                                .getIdInternal().toString());                        finalWorkForm.set("coResponsableTeacherNumber", infoProposal.getCoorientator()                                .getTeacherNumber().toString());                        finalWorkForm.set("coResponsableTeacherName", infoProposal.getCoorientator()                                .getInfoPerson().getNome());                    }                    if (infoProposal.getExecutionDegree() != null                            && infoProposal.getExecutionDegree().getIdInternal() != null) {                        finalWorkForm.set("degree", infoProposal.getExecutionDegree().getIdInternal()                                .toString());                    }                    if (infoProposal.getStatus() != null && infoProposal.getStatus().getStatus() != null) {                        finalWorkForm.set("status", infoProposal.getStatus().getStatus().toString());                    }                    if (infoProposal.getBranches() != null && infoProposal.getBranches().size() > 0) {                        String[] branchList = new String[infoProposal.getBranches().size()];                        for (int i = 0; i < infoProposal.getBranches().size(); i++) {                            InfoBranch infoBranch = ((InfoBranch) infoProposal.getBranches().get(i));                            if (infoBranch != null && infoBranch.getIdInternal() != null) {                                String brachOIDString = infoBranch.getIdInternal().toString();                                if (brachOIDString != null && StringUtils.isNumeric(brachOIDString)) {                                    branchList[i] = brachOIDString;                                }                            }                        }                        finalWorkForm.set("branchList", branchList);                    }                    InfoExecutionDegree infoExecutionDegree = CommonServiceRequests                            .getInfoExecutionDegree(userView, infoProposal.getExecutionDegree()                                    .getIdInternal());                    List branches = CommonServiceRequests.getBranchesByDegreeCurricularPlan(userView,                            infoExecutionDegree.getInfoDegreeCurricularPlan().getIdInternal());                    request.setAttribute("branches", branches);                    request.setAttribute("finalDegreeWorkProposalStatusList",                            FinalDegreeWorkProposalStatus.getLabelValueList());                }            } catch (FenixServiceException e) {                throw new FenixActionException(e);            }        }        return mapping.findForward("show-final-degree-work-proposal");    }