Locale userLocale = requestContext.getExternalContext().getLocale(); this.userService.createNewUser(userRegistrationFormBean, userLocale, Constants.SYSTEM_USER_ID); String emailAddress = userRegistrationFormBean.getChooseEmailAddressFormBean().getEmailAddress(); .code("userRegistration.emailAddress.not.unique") .build(); requestContext.getMessageContext().addMessage(messageResolvable); return "error";
/** * Notify all interested listeners that a state was entered in the flow execution. */ public void fireStateEntered(RequestContext context, StateDefinition previousState) { for (FlowExecutionListener listener : listeners) { listener.stateEntered(context, previousState, context.getCurrentState()); } }
/** * Returns a event with the specified identifier and the specified set of attributes. * @param source the source of the event * @param eventId the result event identifier * @param attributes the event payload attributes * @return the event */ public Event event(Object source, String eventId, AttributeMap<Object> attributes) { return new Event(source, eventId, attributes); }
/** * Notify all interested listeners that a flow execution view is rendering. */ public void fireViewRendering(RequestContext context, View view) { for (FlowExecutionListener listener : listeners) { listener.viewRendering(context, view, context.getCurrentState()); } }
/** * Notify all interested listeners that a flow execution has rendered. */ public void fireViewRendered(RequestContext context, View view) { for (FlowExecutionListener listener : listeners) { listener.viewRendered(context, view, context.getCurrentState()); } }
private static Action getTargetAction(Action action) { if (action instanceof AnnotatedAction) { return getTargetAction(((AnnotatedAction) action).getTargetAction()); } else { return action; } } }
/** * Executes the actions contained within this action list. Simply iterates over each action and calls execute. * Action result events are ignored. * @param context the action execution request context */ public void execute(RequestContext context) { for (Action action : actions) { ActionExecutor.execute(action, context); } }
/** * Notify all interested listeners that a flow execution session has been activated (created, on the stack and about * to start). */ public void fireSessionStarting(RequestContext context, FlowSession session, MutableAttributeMap<?> input) { for (FlowExecutionListener listener : listeners) { listener.sessionStarting(context, session, input); } }
/** * Notify all interested listeners that the active flow execution session is ending. */ public void fireSessionEnding(RequestContext context, FlowSession session, String outcomeId, MutableAttributeMap<?> output) { for (FlowExecutionListener listener : listeners) { listener.sessionEnding(context, session, outcomeId, output); } }
/** * Creates a new annotated action object for the specified action. No contextual properties are provided. * @param targetAction the action */ public AnnotatedAction(Action targetAction) { setTargetAction(targetAction); }
/** * Notify all interested listeners that a request was submitted to the flow execution. */ public void fireRequestSubmitted(RequestContext context) { for (FlowExecutionListener listener : listeners) { listener.requestSubmitted(context); } }
/** * Notify all interested listeners that a flow execution session has started (has entered its start state). */ public void fireSessionStarted(RequestContext context, FlowSession session) { for (FlowExecutionListener listener : listeners) { listener.sessionStarted(context, session); } }
/** * Notify all interested listeners that an event was signaled in the flow execution. */ public void fireEventSignaled(RequestContext context, Event event) { for (FlowExecutionListener listener : listeners) { listener.eventSignaled(context, event); } }
/** * Notify all interested listeners that a flow session was paused in the flow execution. */ public void firePaused(RequestContext context) { for (FlowExecutionListener listener : listeners) { listener.paused(context); } }
/** * Notify all interested listeners that a flow execution threw an exception. */ public void fireExceptionThrown(RequestContext context, FlowExecutionException exception) { for (FlowExecutionListener listener : listeners) { listener.exceptionThrown(context, exception); } } }
/** * Notify all interested listeners that a transition is being entered in the flow execution. */ public void fireTransitionExecuting(RequestContext context, TransitionDefinition transition) { for (FlowExecutionListener listener : listeners) { listener.transitionExecuting(context, transition); } }
/** * Notify all interested listeners that the flow execution was resumed. */ public void fireResuming(RequestContext context) { for (FlowExecutionListener listener : listeners) { listener.resuming(context); } }
/** * Returns a event with the specified identifier. * @param source the source of the event * @param eventId the result event identifier * @return the event */ public Event event(Object source, String eventId) { return new Event(source, eventId, null); }
public void render() { if (action != null) { ActionExecutor.execute(action, requestContext); } }