ResultParticipationCreationBean bean = (ResultParticipationCreationBean)request.getAttribute("bean"); if (bean == null) { bean = new ResultParticipationCreationBean(result); request.setAttribute("bean", bean); }   String resultParticipationsSchema = "result.participations"; String createResultParticipationSchema = "resultParticipation.creation";  if(bean.isBeanExternal()) { createResultParticipationSchema = "resultParticipation.fullCreation"; }  if(result instanceof ResultPublication) { if(((ResultPublication)result).haveResultPublicationRole()) { resultParticipationsSchema = "result.participationsWithRole"; if (!bean.isBeanExternal()) { createResultParticipationSchema = "resultParticipation.creationWithRole"; } else { createResultParticipationSchema = "resultParticipation.fullCreationWithRole"; } } } request.setAttribute("resultParticipationsSchema", resultParticipationsSchema); request.setAttribute("createResultParticipationSchema", createResultParticipationSchema);
    public ActionForward prepareEditParticipation(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        final Result result = readResultFromRequest(request);        if(result==null){            return backToResultList(mapping, form, request, response);        }                if(result instanceof ResultPublication)        {            if(((ResultPublication)result).haveResultPublicationRole())                request.setAttribute("participationsSchema","result.participationsWithRole");        }                final Person person = getUserView(request).getPerson();                if(!result.hasPersonParticipation(person)) {            addActionMessage(request, "researcher.result.editResult.participation.warning");        }        if(result.getResultParticipationsCount()==1){            addActionMessage(request, "researcher.result.lastConnection.warning");        }                return mapping.findForward("editParticipation");    }