finalWorkAttributionForm.set("selectedGroupProposals", selectedProposals);
finalWorkAttributionForm.set("selectedGroupProposals", selectedProposals); finalWorkForm.set("selectedGroupProposals", selectedProposals);
	public ActionForward chooseDegree(ActionMapping mapping, ActionForm form,			HttpServletRequest request, HttpServletResponse response)			throws FenixActionException, FenixFilterException,			FenixServiceException, IllegalAccessException,			InstantiationException {		final IUserView userView = SessionUtils.getUserView(request);		final DynaActionForm finalWorkForm = (DynaActionForm) form;		finalWorkForm.set("role", "responsable");		finalWorkForm.set("responsibleCreditsPercentage", "100");		finalWorkForm.set("coResponsibleCreditsPercentage", "0");		final List infoExecutionYears = CommonServiceRequests				.getInfoExecutionYears();		final Collection transformedInfoExecutionYears = CollectionUtils				.collect(						infoExecutionYears,						new FinalDegreeWorkProposalsDispatchAction().new INFO_EXECUTION_YEAR_INCREMENTER());		request.setAttribute("infoExecutionYears", transformedInfoExecutionYears);		final String executionYear = (String) finalWorkForm				.get("executionYear");		InfoExecutionYear infoExecutionYear = null;		if (executionYear == null || executionYear.length() == 0) {			infoExecutionYear = findCurrentExecutionDegree(infoExecutionYears);			if (infoExecutionYear != null) {				finalWorkForm.set("executionYear", infoExecutionYear						.getIdInternal().toString());			}		} else {			infoExecutionYear = findExecutionDegreeByID(infoExecutionYears,					new Integer(executionYear));		}		final List executionDegreeList = (List) ServiceUtils.executeService(				userView, "ReadExecutionDegreesByExecutionYearAndDegreeType",				new Object[] { infoExecutionYear, DegreeType.DEGREE });		final BeanComparator name = new BeanComparator(				"infoDegreeCurricularPlan.infoDegree.nome");		Collections.sort(executionDegreeList, name);		request.setAttribute("executionDegreeList", executionDegreeList);		final InfoTeacher infoTeacher = getTeacher(userView);		final Object args[] = { infoTeacher.getIdInternal() };		final List finalDegreeWorkProposalHeaders = (List) ServiceUtils				.executeService(userView,						"ReadFinalDegreeWorkProposalHeadersByTeacher", args);		if ((finalDegreeWorkProposalHeaders != null)				&& !(finalDegreeWorkProposalHeaders.isEmpty())) {			final BeanComparator title = new BeanComparator("title");			Collections.sort(finalDegreeWorkProposalHeaders, title);			final String[] selectedProposals = new String[finalDegreeWorkProposalHeaders					.size()];			for (int i = 0; i < finalDegreeWorkProposalHeaders.size(); i++) {				final FinalDegreeWorkProposalHeader header = (FinalDegreeWorkProposalHeader) finalDegreeWorkProposalHeaders						.get(i);				if (header.getGroupAttributedByTeacher() != null) {					final InfoGroupProposal infoGroupProposal = (InfoGroupProposal) CollectionUtils							.find(									header.getGroupProposals(),									new PREDICATE_FIND_GROUP_PROPOSAL_BY_GROUP(											header													.getGroupAttributedByTeacher()													.getIdInternal()));					selectedProposals[i] = infoGroupProposal.getIdInternal()							.toString();				}			}                        ModuleConfig moduleConfig = mapping.getModuleConfig();			final FormBeanConfig fbc2 = moduleConfig.findFormBeanConfig("finalWorkAttributionForm");			final DynaActionFormClass dafc2 = DynaActionFormClass					.createDynaActionFormClass(fbc2);			final DynaActionForm finalWorkAttributionForm = (DynaActionForm) dafc2					.newInstance();			finalWorkAttributionForm.set("selectedGroupProposals",					selectedProposals);			request.setAttribute("finalWorkAttributionForm",					finalWorkAttributionForm);			request.setAttribute("finalDegreeWorkProposalHeaders",					finalDegreeWorkProposalHeaders);		}		return mapping.findForward("chooseDegreeForFinalWorkProposal");	}