"" + i));
"" + infoExecutionPeriod2.getIdInternal()));
	public static void prepareChangeExecutionDegreeAndCurricularYear(HttpServletRequest request) {		IUserView userView = SessionUtils.getUserView(request);		InfoExecutionPeriod infoExecutionPeriod =			(InfoExecutionPeriod) request.getAttribute(				SessionConstants.EXECUTION_PERIOD);		/* Obtain a list of curricular years */		List labelListOfCurricularYears = getLabelListOfCurricularYears();		request.setAttribute(			SessionConstants.LABELLIST_CURRICULAR_YEARS,			labelListOfCurricularYears);		/* Obtain a list of degrees for the specified execution year */		Object argsLerLicenciaturas[] =			{ infoExecutionPeriod.getInfoExecutionYear()};		List executionDegreeList = null;		try {			executionDegreeList =				(List) ServiceUtils.executeService(					userView,					"ReadExecutionDegreesByExecutionYear",					argsLerLicenciaturas);			/* Sort the list of degrees */			Collections.sort(				executionDegreeList,				new ComparatorByNameForInfoExecutionDegree());		} catch (FenixServiceException e) {			// TODO Auto-generated catch block			e.printStackTrace();		}		/* Generate a label list for the above list of degrees */		List labelListOfExecutionDegrees =			getLabelListOfExecutionDegrees(executionDegreeList);		request.setAttribute("licenciaturas", labelListOfExecutionDegrees);		///////////////////////////////////////////////////////////////////////		// TODO : place the following code in a seperate function and call it		//        here and anywhere else the execution period may be selected.		//HttpSession session = request.getSession(false);		//IUserView userView = (IUserView) request.getSession(false).getAttribute("UserView");		GestorServicos gestor = GestorServicos.manager();		InfoExecutionPeriod selectedExecutionPeriod =			(InfoExecutionPeriod) request.getAttribute(				SessionConstants.EXECUTION_PERIOD);		Object argsReadExecutionPeriods[] = {		};		ArrayList executionPeriods;		try {			executionPeriods =				(ArrayList) gestor.executar(					userView,					"ReadExecutionPeriods",					argsReadExecutionPeriods);			selectedExecutionPeriod.getInfoExecutionYear().getYear();			selectedExecutionPeriod.getSemester();			ComparatorChain chainComparator = new ComparatorChain();			chainComparator.addComparator(				new BeanComparator("infoExecutionYear.year"));			chainComparator.addComparator(new BeanComparator("semester"));			Collections.sort(executionPeriods, chainComparator);			ArrayList executionPeriodsLabelValueList = new ArrayList();			for (int i = 0; i < executionPeriods.size(); i++) {				InfoExecutionPeriod infoExecutionPeriod2 =					(InfoExecutionPeriod) executionPeriods.get(i);				executionPeriodsLabelValueList.add(					new LabelValueBean(						infoExecutionPeriod2.getName()							+ " - "							+ infoExecutionPeriod2								.getInfoExecutionYear()								.getYear(),						"" + i));			}			request.setAttribute(				SessionConstants.LIST_INFOEXECUTIONPERIOD,				executionPeriods);			request.setAttribute(				SessionConstants.LABELLIST_EXECUTIONPERIOD,				executionPeriodsLabelValueList);		} catch (FenixServiceException e1) {		}	}