new Integer(executionPeriods.indexOf(selectedExecutionPeriod)));
selectedExecutionPeriod.getIdInternal());
	public ActionForward prepare(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response)		throws Exception {		HttpSession session = request.getSession(false);		IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);		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 executionPeriod was previously selected,form has that		// value as default		if (selectedExecutionPeriod != null) {			DynaActionForm indexForm = (DynaActionForm) form;			indexForm.set(				"index",				new Integer(executionPeriods.indexOf(selectedExecutionPeriod)));		}		//----------------------------------------------		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(),					"" + i));		}		request.setAttribute(			SessionConstants.LIST_INFOEXECUTIONPERIOD,			executionPeriods);		request.setAttribute(			SessionConstants.LABELLIST_EXECUTIONPERIOD,			executionPeriodsLabelValueList);		return mapping.findForward("showForm");	}