@Override public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException { try { super.execute(mapping, form, request, response); } catch (Exception e1) { e1.printStackTrace(); } String groupPropertiesCodeString = request.getParameter("groupPropertiesCode"); Integer groupPropertiesCode = new Integer(groupPropertiesCodeString); ISiteComponent shiftsAndGroupsView = new InfoSiteShiftsAndGroups(); readSiteView(request, shiftsAndGroupsView, null, groupPropertiesCode, null); InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD); InfoExecutionDegree infoExecutionDegree = RequestUtils.getExecutionDegreeFromRequest( request, infoExecutionPeriod.getInfoExecutionYear()); Integer curricularYear = (Integer) request.getAttribute("curYear"); List infoExecutionCourses = (List) SelectExportExecutionCourse.run( infoExecutionDegree, infoExecutionPeriod, curricularYear); Collections.sort(infoExecutionCourses, new BeanComparator("nome")); request.setAttribute("exeCourseList", infoExecutionCourses); return mapping.findForward("sucess"); }
public ActionForward nextPagePublic( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixActionException { DynaActionForm escolherContextoForm = (DynaActionForm) form; InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD); Integer semestre = infoExecutionPeriod.getSemester(); Integer anoCurricular = (Integer) escolherContextoForm.get("curYear"); // Integer degreeCurricularPlanId = // getFromRequest("degreeCurricularPlanID", request); request.setAttribute("degreeCurricularPlanID", ""); // Integer degreeId = getFromRequest("degreeID", request); request.setAttribute("degreeID", ""); Integer index = Integer.valueOf((String) escolherContextoForm.get("index")); request.setAttribute("curYear", anoCurricular); request.setAttribute("semester", semestre); List infoExecutionDegreeList; infoExecutionDegreeList = ReadExecutionDegreesByExecutionYear.run(infoExecutionPeriod.getInfoExecutionYear()); Collections.sort(infoExecutionDegreeList, new ComparatorByNameForInfoExecutionDegree()); InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) infoExecutionDegreeList.get(index.intValue()); request.setAttribute(PresentationConstants.EXECUTION_DEGREE, infoExecutionDegree); if (infoExecutionDegree == null) { return mapping.findForward("Licenciatura execucao inexistente"); } RequestUtils.setExecutionDegreeToRequest(request, infoExecutionDegree); String nextPage = request.getParameter("nextPage"); if (nextPage != null) { return mapping.findForward(nextPage); } // TODO : throw a proper exception throw new FenixActionException("SomeOne is messing around with the links"); }