ContextUtils.getLabelListOfCurricularYears();
ContextUtils.getLabelListOfOptionalCurricularYears();
	public ActionForward prepareSearch(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response)		throws Exception {		// TODO : find a way to refactor this code so it is shared with context selection.		//        this implies changing the form value from index to executionPeriodOID etc.		//        The same should be done with the selection of the execution course and 		//        of the curricular year.		IUserView userView =			(IUserView) request.getSession(false).getAttribute("UserView");		GestorServicos gestor = GestorServicos.manager();		InfoExecutionPeriod selectedExecutionPeriod =			(InfoExecutionPeriod) request.getAttribute(				SessionConstants.EXECUTION_PERIOD);		Object argsReadExecutionPeriods[] = {		};		ArrayList executionPeriods =			(ArrayList) gestor.executar(				userView,				"ReadExecutionPeriods",				argsReadExecutionPeriods);		ComparatorChain chainComparator = new ComparatorChain();		chainComparator.addComparator(			new BeanComparator("infoExecutionYear.year"));		chainComparator.addComparator(new BeanComparator("semester"));		Collections.sort(executionPeriods, chainComparator);		if (selectedExecutionPeriod != null) {			DynaActionForm searchExecutionCourse = (DynaActionForm) form;			searchExecutionCourse.set(				"executionPeriodOID",				selectedExecutionPeriod.getIdInternal().toString());		}		ArrayList executionPeriodsLabelValueList = new ArrayList();		for (int i = 0; i < executionPeriods.size(); i++) {			InfoExecutionPeriod infoExecutionPeriod =				(InfoExecutionPeriod) executionPeriods.get(i);			executionPeriodsLabelValueList.add(				new LabelValueBean(					infoExecutionPeriod.getName()						+ " - "						+ infoExecutionPeriod.getInfoExecutionYear().getYear(),					infoExecutionPeriod.getIdInternal().toString()));		}		request.setAttribute(			SessionConstants.LABELLIST_EXECUTIONPERIOD,			executionPeriodsLabelValueList);		////////////////////////////////////////////////////////////////////////////		/* Obtain a list of curricular years */		List labelListOfCurricularYears =			ContextUtils.getLabelListOfCurricularYears();		request.setAttribute(			SessionConstants.LABELLIST_CURRICULAR_YEARS,			labelListOfCurricularYears);		/* Obtain a list of degrees for the specified execution year */		Object argsLerLicenciaturas[] =			{ selectedExecutionPeriod.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 =			ContextUtils.getLabelListOfExecutionDegrees(executionDegreeList);		request.setAttribute(			SessionConstants.LIST_INFOEXECUTIONDEGREE,			labelListOfExecutionDegrees);		return mapping.findForward("ShowSearchForm");	}