Integer degreeCurricularPlanID = (Integer) formBean.get("degreeCurricularPlanID"); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);
    public ActionForward readStudents(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException {        DynaActionForm formBean = (DynaActionForm)form;        HttpSession session = request.getSession(false);        Integer executionCourseID = null;        List coursesIDs = null;        List enrollmentTypeList = null;        String[] enrollmentType = null;        List shiftIDs = null;        try {            executionCourseID = new Integer(request.getParameter("objectCode"));        } catch (NumberFormatException ex) {            //ok, we don't want to view a shift's student list        }                Integer checkedCoursesIds[] = (Integer[]) formBean.get("coursesIDs");        enrollmentType = (String[]) formBean.get("enrollmentType");        Integer checkedShiftIds[] = (Integer[]) formBean.get("shiftIDs");                enrollmentTypeList = new ArrayList();        for(int i = 0; i < enrollmentType.length; i++){            if(enrollmentType[i].equals(AttendacyStateSelectionType.ALL.toString())){                enrollmentTypeList = null;                break;            } else {                enrollmentTypeList.add(new AttendacyStateSelectionType(enrollmentType[i]));            }        }                coursesIDs = new ArrayList();        for(int i = 0; i < checkedCoursesIds.length; i++){            if(checkedCoursesIds[i].equals(new Integer(0))){                coursesIDs=null;                break;            }            else{                coursesIDs.add(checkedCoursesIds[i]);            }        }                shiftIDs = new ArrayList();        for(int i = 0; i < checkedShiftIds.length; i++){            if(checkedShiftIds[i].equals(new Integer(0))){                shiftIDs=null;                break;            }            else{                shiftIDs.add(checkedShiftIds[i]);            }        }               UserView userView = (UserView) session.getAttribute(SessionConstants.U_VIEW);        Object args[] = { executionCourseID, coursesIDs, enrollmentTypeList, shiftIDs };        TeacherAdministrationSiteView siteView = null;        InfoForReadStudentsWithAttendsByExecutionCourse infoDTO = null;        try {            siteView = (TeacherAdministrationSiteView) ServiceManagerServiceFactory.executeService(                    userView, "ReadStudentsWithAttendsByExecutionCourse", args);                        infoDTO = (InfoForReadStudentsWithAttendsByExecutionCourse) siteView.getComponent();                        Collections.sort(infoDTO.getInfoAttends(), new BeanComparator("infoAttends.aluno.number"));        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        request.setAttribute("objectCode", executionCourseID);        request.setAttribute("siteView", siteView);        DynaActionForm studentsByCurricularCourseForm = (DynaActionForm) form;        String value = (String) studentsByCurricularCourseForm.get("viewPhoto");        if (value != null && (value.equals("true") || value.equals("yes") || value.equals("on"))) {            request.setAttribute("viewPhoto", Boolean.TRUE);        } else {            request.setAttribute("viewPhoto", Boolean.FALSE);        }                        Map sendMailParameters = new HashMap();        sendMailParameters.put("objectCode",infoDTO.getInfoExecutionCourse().getIdInternal());        sendMailParameters.put("method","prepare");        request.setAttribute("sendMailLinkParameters",sendMailParameters);                String cbCoursesString[] = new String[checkedCoursesIds.length];        for (int i = 0; i < checkedCoursesIds.length; i++){            cbCoursesString[i] = checkedCoursesIds[i].toString();        }                String cbShiftsString[] = new String[checkedShiftIds.length];        for (int i = 0; i < checkedShiftIds.length; i++){            cbShiftsString[i] = checkedShiftIds[i].toString();        }                Map spreadSheetParameters = new HashMap();        spreadSheetParameters.put("objectCode",infoDTO.getInfoExecutionCourse().getIdInternal());        spreadSheetParameters.put("method","prepare");        spreadSheetParameters.put("coursesIDs",cbCoursesString);        spreadSheetParameters.put("enrollmentType",enrollmentType);        spreadSheetParameters.put("shiftIDs",cbShiftsString);        request.setAttribute("spreadSheetLinkArgs",spreadSheetParameters);                return mapping.findForward("success");    }