Examples of ViewState


Examples of org.springframework.webflow.engine.ViewState

    assertEquals(1, mockListener.getTransitionExecutingCount());
  }

  public void testRequestContextManagedOnStartAndResume() {
    Flow flow = new Flow("flow");
    new ViewState(flow, "view", new StubViewFactory()) {
      public void resume(RequestControlContext context) {
        assertSame(context, RequestContextHolder.getRequestContext());
      }
    };
    FlowExecutionImpl execution = new FlowExecutionImpl(flow);
View Full Code Here

Examples of org.springframework.webflow.engine.ViewState

  }

  public void testStateAndFallbackModelValidationMethodInvoked() {
    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

  }

  public void testFallbackModelValidationMethodInvoked() {
    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

  }

  public void testStateAndFallbackErrorsModelValidationMethodInvoked() {
    ErrorsModel model = new ErrorsModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

  }

  public void testFallbackModelErrorsValidationMethodInvoked() {
    ErrorsModel model = new ErrorsModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

    applicationContext.getBeanFactory().registerSingleton("modelValidator", validator);
    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Object model = new Object();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

    applicationContext.getBeanFactory().registerSingleton("modelValidator", validator);
    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Object model = new Object();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

    applicationContext.getBeanFactory().registerSingleton("modelValidator", validator);
    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Object model = new Object();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

    applicationContext.getBeanFactory().registerSingleton("modelValidator", validator);
    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Object model = new Object();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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

Examples of org.springframework.webflow.engine.ViewState

    applicationContext.getBeanFactory().registerSingleton("modelValidator", validator);
    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Object model = new Object();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, 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
Copyright © 2018 www.massapi.com. 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.