Package org.springframework.webflow.engine.support

Examples of org.springframework.webflow.engine.support.DefaultTransitionCriteria


   */
  protected TransitionCriteria createBooleanExpressionTransitionCriteria(String encodedCriteria,
      ExpressionParser parser) throws ConversionExecutionException {
    Expression expression = parser.parseExpression(encodedCriteria, new FluentParserContext().template().evaluate(
        RequestContext.class));
    return new DefaultTransitionCriteria(expression);
  }
View Full Code Here


  }

  private Transition parseThen(IfModel ifModel) {
    Expression test = getLocalContext().getExpressionParser().parseExpression(ifModel.getTest(),
        new FluentParserContext().evaluate(RequestContext.class).expectResult(Boolean.class));
    TransitionCriteria matchingCriteria = new DefaultTransitionCriteria(test);
    TargetStateResolver targetStateResolver = (TargetStateResolver) fromStringTo(TargetStateResolver.class)
        .execute(ifModel.getThen());
    return getLocalContext().getFlowArtifactFactory().createTransition(targetStateResolver, matchingCriteria, null,
        null);
  }
View Full Code Here

    assertEquals(Model.State1.class, validator.hints[0]);
  }

  public void testSmartValidatorWithHintOnTransition() {
    Transition transition = new Transition();
    transition.setMatchingCriteria(new DefaultTransitionCriteria(new StaticExpression(eventId)));
    transition.getAttributes().put("validationHints", new StaticExpression("State1"));

    ViewState state = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    state.getTransitionSet().add(transition);
    requestContext.setCurrentState(state);
View Full Code Here

   */
  protected TransitionCriteria createBooleanExpressionTransitionCriteria(String encodedCriteria,
      ExpressionParser parser) throws ConversionExecutionException {
    Expression expression = parser.parseExpression(encodedCriteria,
        new FluentParserContext().template().evaluate(RequestContext.class));
    return new DefaultTransitionCriteria(expression);
  }
View Full Code Here

  }

  private Transition parseThen(IfModel ifModel) {
    Expression test = getLocalContext().getExpressionParser().parseExpression(ifModel.getTest(),
        new FluentParserContext().evaluate(RequestContext.class).expectResult(Boolean.class));
    TransitionCriteria matchingCriteria = new DefaultTransitionCriteria(test);
    TargetStateResolver targetStateResolver = (TargetStateResolver) fromStringTo(TargetStateResolver.class)
        .execute(ifModel.getThen());
    return getLocalContext().getFlowArtifactFactory().createTransition(targetStateResolver, matchingCriteria, null,
        null);
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.support.DefaultTransitionCriteria

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.