if(RenderUtils.getViewState().getMetaObject().getObject() instanceof ResultEventAssociationSimpleCreationBean){ ResultEventAssociationSimpleCreationBean simpleBean = (ResultEventAssociationSimpleCreationBean) RenderUtils.getViewState().getMetaObject().getObject();
if(renderedObject instanceof ResultEventAssociationSimpleCreationBean){ final ResultEventAssociationSimpleCreationBean simpleBean = (ResultEventAssociationSimpleCreationBean) renderedObject;
    public ActionForward createEventAssociationSimple(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws Exception {        final IUserView userView = getUserView(request);                if(RenderUtils.getViewState().getMetaObject().getObject() instanceof ResultEventAssociationSimpleCreationBean){            ResultEventAssociationSimpleCreationBean simpleBean = (ResultEventAssociationSimpleCreationBean) RenderUtils.getViewState().getMetaObject().getObject();            if(simpleBean.getEvent() != null) {                Integer oid = Integer.parseInt(request.getParameter("resultId"));                ServiceUtils.executeService(userView, "CreateResultEventAssociation", new Object[] {simpleBean, oid });                return prepareEditEventAssociations(mapping, form, request, response);            }            else {                ResultEventAssociationFullCreationBean fullBean = new ResultEventAssociationFullCreationBean();                fullBean.setEventName(new MultiLanguageString(simpleBean.getEventName()));                fullBean.setRole(simpleBean.getRole());                request.setAttribute("fullBean", fullBean);                return prepareEditEventAssociations(mapping, form, request, response);            }        }        else {            request.setAttribute("fullBean", (ResultEventAssociationFullCreationBean) RenderUtils.getViewState().getMetaObject().getObject());            return prepareEditEventAssociations(mapping, form, request, response);        }            }