Package org.springframework.webflow.engine

Examples of org.springframework.webflow.engine.ViewState


  public void testStateAndFallbackModelValidationMethodInvoked() {
    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(model.state1Invoked);
    assertTrue(model.fallbackInvoked);
  }
View Full Code Here


  public void testFallbackModelValidationMethodInvoked() {
    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(model.state1Invoked);
    assertTrue(model.fallbackInvoked);
  }
View Full Code Here

  public void testStateAndFallbackErrorsModelValidationMethodInvoked() {
    ErrorsModel model = new ErrorsModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(model.state1Invoked);
    assertTrue(model.fallbackInvoked);
  }
View Full Code Here

  public void testFallbackModelErrorsValidationMethodInvoked() {
    ErrorsModel model = new ErrorsModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(model.state1Invoked);
    assertTrue(model.fallbackInvoked);
  }
View Full Code Here

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    ExtendedModel model = new ExtendedModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    ExtendedModel model = new ExtendedModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    ExtendedModel model = new ExtendedModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.ViewState

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.