Package org.springframework.webflow.definition

Examples of org.springframework.webflow.definition.TransitionDefinition


    determineEventId(requestContext);
    if (eventId == null) {
      return;
    }

    TransitionDefinition transition = requestContext.getMatchingTransition(eventId);
    if (shouldBind(transition)) {
      mappingResults = bind();

      if (mappingResults == null) {
        return;
View Full Code Here


      return;
    }
    if (logger.isDebugEnabled()) {
      logger.debug("Resolved model " + model);
    }
    TransitionDefinition transition = requestContext.getMatchingTransition(eventId);
    if (shouldBind(model, transition)) {
      mappingResults = bind(model);
      if (hasErrors(mappingResults)) {
        if (logger.isDebugEnabled()) {
          logger.debug("Model binding resulted in errors; adding error messages to context");
View Full Code Here

      variable.restore(context);
    }
  }

  private void updateHistory(RequestControlContext context) {
    TransitionDefinition transition = context.getCurrentTransition();
    History history = (History) transition.getAttributes().get("history");
    if (history == null || history == History.PRESERVE) {
      context.updateCurrentFlowExecutionSnapshot();
    } else if (history == History.DISCARD) {
      context.removeCurrentFlowExecutionSnapshot();
    } else if (history == History.INVALIDATE) {
View Full Code Here

  }

  TransitionDefinition getMatchingTransition(String eventId) {
    FlowSessionImpl session = getActiveSessionInternal();
    TransitionableState currentState = (TransitionableState) session.getState();
    TransitionDefinition transition = currentState.getTransition(eventId);
    if (transition == null) {
      transition = session.getFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

    return getFlowExecutionContext().getActiveSession().getState();
  }

  public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException {
    TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState();
    TransitionDefinition transition = state.getTransition(eventId);
    if (transition == null) {
      transition = getRootFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

  public boolean isImmediate() {
    RequestContext context = RequestContextHolder.getRequestContext();
    if (context != null && getActionExpression().isLiteralText()
        && context.getCurrentState() instanceof TransitionableState) {
      TransitionDefinition transition = context
          .getMatchingTransition(getActionExpression().getExpressionString());
      if (transition != null && transition.getAttributes().contains("bind")) {
        return Boolean.FALSE.equals(transition.getAttributes().getBoolean("bind"));
      }
    }
    return super.isImmediate();
  }
View Full Code Here

  private boolean shouldValidate(RequestContext requestContext, Object model, String eventId) {
    if (model == null) {
      return false;
    }
    TransitionDefinition transition = requestContext.getMatchingTransition(eventId);
    if (transition != null) {
      if (transition.getAttributes().contains("validate")) {
        return transition.getAttributes().getBoolean("validate").booleanValue();
      }
    }
    return true;
  }
View Full Code Here

  private static Object[] initValidationHints(Object model, RequestContext requestContext, String eventId,
      ValidationHintResolver hintResolver) {

    Expression expr = null;
    TransitionDefinition transition = requestContext.getMatchingTransition(eventId);
    if (transition != null) {
      expr = (Expression) transition.getAttributes().get("validationHints");
    }
    if (expr == null) {
      expr = (Expression) requestContext.getCurrentState().getAttributes().get("validationHints");
    }
    if (expr == null) {
View Full Code Here

    return getFlowExecutionContext().getActiveSession().getState();
  }

  public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException {
    TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState();
    TransitionDefinition transition = state.getTransition(eventId);
    if (transition == null) {
      transition = getRootFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

      variable.restore(context);
    }
  }

  private void updateHistory(RequestControlContext context) {
    TransitionDefinition transition = context.getCurrentTransition();
    History history = (History) transition.getAttributes().get("history");
    if (history == null || history == History.PRESERVE) {
      View currentView = context.getCurrentView();
      if (currentView != null && shouldRedirect(context)) {
        currentView.saveState();
      }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.definition.TransitionDefinition

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.