public ActionForward prepare( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixFilterException, FenixServiceException { IUserView userView = UserView.getUser(); InfoExecutionYear executionYear = ReadCurrentExecutionYear.run(); Object[] argsDCPs = {executionYear.getIdInternal()}; List degreeCurricularPlans = (List) ServiceUtils.executeService("ReadActiveDegreeCurricularPlansByExecutionYear", argsDCPs); final ComparatorChain comparatorChain = new ComparatorChain(); comparatorChain.addComparator(new BeanComparator("infoDegree.tipoCurso")); comparatorChain.addComparator(new BeanComparator("infoDegree.nome")); Collections.sort(degreeCurricularPlans, comparatorChain); request.setAttribute("degreeCurricularPlans", degreeCurricularPlans); DynaActionForm dynaActionForm = (DynaActionForm) form; Integer[] defaultLimits = {0, 10, 35, 65, 90, 100}; dynaActionForm.set("entryGradeLimits", defaultLimits); dynaActionForm.set("approvationRatioLimits", defaultLimits); dynaActionForm.set("arithmeticMeanLimits", defaultLimits); return mapping.findForward("chooseDegreeCurricularPlan"); }
protected InfoExecutionYear getCurrentExecutionYear() { return InfoExecutionYear.newInfoFromDomain(ExecutionYear.readCurrentExecutionYear()); }