Java Code Examples for org.springframework.webflow.execution.RequestContext#getMessageContext()

The following examples show how to use org.springframework.webflow.execution.RequestContext#getMessageContext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractMultiFactorAuthenticationViaFormAction.java    From cas-mfa with Apache License 2.0 5 votes vote down vote up
@Override
protected final Event doExecute(final RequestContext ctx) throws Exception {
    final Credential credentials = WebUtils.getCredential(ctx);
    final MessageContext messageContext = ctx.getMessageContext();


    if (credentials != null) {
        final String id = credentials.getId();
        return submit(ctx, credentials, messageContext, id);
    }
    logger.warn("Credentials could not be determined, or no username was associated with the request.");
    return getErrorEvent(ctx);
}
 
Example 2
Source File: ValidateLoginCaptchaAction.java    From sso with MIT License 4 votes vote down vote up
/**
 * 跳转到错误页
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 3
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 4
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 5
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 6
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 7
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 8
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}
 
Example 9
Source File: ValidateLoginAction.java    From CAS with Apache License 2.0 2 votes vote down vote up
/**
 * 跳转到错误页
 *
 * @param requestContext
 * @return
 */
private Event getError(final RequestContext requestContext, String CODE) {
    final MessageContext messageContext = requestContext.getMessageContext();
    messageContext.addMessage(new MessageBuilder().error().code(CODE).build());
    return getEventFactorySupport().event(this, CODE);
}