if (!masterDegreeCoursesDTOs.isEmpty()) { Iterator orderedCoursesIter = new OrderedIterator(masterDegreeCoursesDTOs.iterator(), new BeanComparator("curricularCourse.name")); request.setAttribute("masterDegreeCoursesDTOs", orderedCoursesIter); }  return mapping.findForward("showCreditsReport");
    public ActionForward viewMasterDegreeCredits(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixFilterException,            FenixServiceException {        IUserView userView = SessionUtils.getUserView(request);        DynaActionForm dynaForm = (DynaActionForm) form;        Integer executionDegreeID = (Integer) dynaForm.get("executionDegreeID");        Object[] args = { ExecutionDegree.class, executionDegreeID };        ExecutionDegree executionDegree = (ExecutionDegree) ServiceUtils.executeService(userView,                "ReadDomainObject", args);        request.setAttribute("executionDegree", executionDegree);        List<CurricularCourse> curricularCourses = executionDegree.getDegreeCurricularPlan()                .getCurricularCoursesWithExecutionIn(executionDegree.getExecutionYear());        List<MasterDegreeCreditsDTO> masterDegreeCoursesDTOs = new ArrayList<MasterDegreeCreditsDTO>();        for (CurricularCourse curricularCourse : curricularCourses) {            MasterDegreeCreditsDTO masterDegreeCreditsDTO = new MasterDegreeCreditsDTO(curricularCourse,                    executionDegree.getExecutionYear());            masterDegreeCoursesDTOs.add(masterDegreeCreditsDTO);        }        if (!masterDegreeCoursesDTOs.isEmpty()) {            Iterator orderedCoursesIter = new OrderedIterator(masterDegreeCoursesDTOs.iterator(),                    new BeanComparator("curricularCourse.name"));            request.setAttribute("masterDegreeCoursesDTOs", orderedCoursesIter);        }        return mapping.findForward("showCreditsReport");    }