Package org.springframework.binding.message

Examples of org.springframework.binding.message.StateManageableMessageContext


    State state = session.getFlow().getStateInstance(stateId);
    session.setCurrentState(state);
  }

  private MessageContext createMessageContext(MessageSource messageSource) {
    StateManageableMessageContext messageContext = new DefaultMessageContext(messageSource);
    Serializable messagesMemento = (Serializable) getFlashScope().extract("messagesMemento");
    if (messagesMemento != null) {
      messageContext.restoreMessages(messagesMemento);
    }
    return messageContext;
  }
View Full Code Here


    }
    return messageContext;
  }

  private void saveMessages(RequestContext context) {
    StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext();
    Serializable messagesMemento = messageContext.createMessagesMemento();
    getFlashScope().put("messagesMemento", messagesMemento);
  }
View Full Code Here

    listeners.fireSessionCreating(context, flow);
    FlowSession session = activateSession(flow);
    if (input == null) {
      input = new LocalAttributeMap();
    }
    StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext();
    messageContext.setMessageSource(flow.getApplicationContext());
    listeners.fireSessionStarting(context, session, input);
    flow.start(context, input);
    listeners.fireSessionStarted(context, session);
  }
View Full Code Here

      input = new LocalAttributeMap<Object>();
    }
    if (hasEmbeddedModeAttribute(input)) {
      session.setEmbeddedMode();
    }
    StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext();
    messageContext.setMessageSource(flow.getApplicationContext());
    listeners.fireSessionStarting(context, session, input);
    flow.start(context, input);
    listeners.fireSessionStarted(context, session);
  }
View Full Code Here

  }

  // internal helpers

  private MessageContext createMessageContext(MessageSource messageSource) {
    StateManageableMessageContext messageContext = new DefaultMessageContext(messageSource);
    Serializable messagesMemento = (Serializable) getFlashScope().extract("messagesMemento");
    if (messagesMemento != null) {
      messageContext.restoreMessages(messagesMemento);
    }
    return messageContext;
  }
View Full Code Here

    }
    return flowSessions.getLast();
  }

  private void saveFlashMessages(RequestContext context) {
    StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext();
    Serializable messagesMemento = messageContext.createMessagesMemento();
    getFlashScope().put("messagesMemento", messagesMemento);
  }
View Full Code Here

TOP

Related Classes of org.springframework.binding.message.StateManageableMessageContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.