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);
checkNeededSchemas(request, result, bean); checkNeededWarnings(request, result); request.setAttribute("result", result);
    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); }                //Action Warning Messages        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");        }                ResultParticipationCreationBean bean = (ResultParticipationCreationBean)request.getAttribute("bean");        if (bean == null) {            bean = new ResultParticipationCreationBean(result);            request.setAttribute("bean", bean);        }                //Defining schemas to use        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);                return mapping.findForward("editParticipation");    }