Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.View


        context.getExternalContext().requestFlowExecutionRedirect();
        if (popup) {
          context.getExternalContext().requestRedirectInPopup();
        }
      } else {
        View view = viewFactory.getView(context);
        render(context, view);
      }
    }
  }
View Full Code Here


    }
  }

  public void resume(RequestControlContext context) {
    restoreVariables(context);
    View view = viewFactory.getView(context);
    view.processUserEvent();
    if (view.hasFlowEvent()) {
      Event event = view.getFlowEvent();
      if (logger.isDebugEnabled()) {
        logger.debug("Event '" + event.getId() + "' returned from view " + view);
      }
      context.getRequestScope().put("webflow.originatingViewState", this);
      boolean stateExited = context.handleEvent(event);
View Full Code Here

    context.inViewState();
    EasyMock.expectLastCall().andReturn(Boolean.FALSE);

    EasyMock.replay(new Object[] { context });

    View view = factory.getView(context);
    ((JsfView) view).getViewRoot().setTransient(true);
    view.render();

    assertTrue(newRoot.isTransient());
    assertTrue(((NoRenderViewHandler) viewHandler).rendered);
  }
View Full Code Here

    context.inViewState();
    EasyMock.expectLastCall().andReturn(Boolean.TRUE);

    EasyMock.replay(new Object[] { context });

    View newView = factory.getView(context);

    assertNotNull("A View was not created", newView);
    assertTrue("A JsfView was expected", newView instanceof JsfView);
    assertEquals("View name did not match", VIEW_ID, ((JsfView) newView).getViewRoot().getViewId());
    assertFalse("An unexpected event was signaled,", newView.hasFlowEvent());
  }
View Full Code Here

    context.inViewState();
    EasyMock.expectLastCall().andReturn(Boolean.TRUE);

    EasyMock.replay(new Object[] { context });

    View restoredView = factory.getView(context);

    assertNotNull("A View was not restored", restoredView);
    assertTrue("A JsfView was expected", restoredView instanceof JsfView);
    assertEquals("View name did not match", VIEW_ID, ((JsfView) restoredView).getViewRoot().getViewId());
    assertFalse("An unexpected event was signaled,", restoredView.hasFlowEvent());
    assertTrue("The input component's valid flag was not reset", input.isValid());
  }
View Full Code Here

    context.inViewState();
    EasyMock.expectLastCall().andReturn(Boolean.TRUE);

    EasyMock.replay(new Object[] { context });

    View restoredView = factory.getView(context);

    assertNotNull("A View was not restored", restoredView);
    assertTrue("A JsfView was expected", restoredView instanceof JsfView);
    assertEquals("View name did not match", VIEW_ID, ((JsfView) restoredView).getViewRoot().getViewId());
    assertFalse("An unexpected event was signaled,", restoredView.hasFlowEvent());
    assertSame("The UIInput binding was not restored properly", input, testBean.getInput());
    assertSame("The faceted UIOutput binding was not restored properly", output, testBean.getOutput());
  }
View Full Code Here

    context.inViewState();
    EasyMock.expectLastCall().andReturn(Boolean.TRUE);

    EasyMock.replay(new Object[] { context });

    View restoredView = factory.getView(context);

    assertNotNull("A View was not restored", restoredView);
    assertTrue("A JsfView was expected", restoredView instanceof JsfView);
    assertTrue("An AjaxViewRoot was not set", ((JsfView) restoredView).getViewRoot() instanceof AjaxViewRoot);
    assertEquals("View name did not match", VIEW_ID, ((JsfView) restoredView).getViewRoot().getViewId());
    assertFalse("An unexpected event was signaled,", restoredView.hasFlowEvent());
  }
View Full Code Here

    jsfMock.facesContext().setViewRoot(newRoot);
    jsfMock.facesContext().renderResponse();

    EasyMock.replay(new Object[] { context });

    View newView = factory.getView(context);

    assertNotNull("A View was not created", newView);
    assertTrue("A JsfView was expected", newView instanceof JsfView);
    assertEquals("View name did not match", VIEW_ID, ((JsfView) newView).getViewRoot().getViewId());
    assertSame("View root was not the third party instance", newRoot, ((JsfView) newView).getViewRoot());
    assertFalse("An unexpected event was signaled,", newView.hasFlowEvent());
  }
View Full Code Here

  public void testGetView() throws Exception {
    TestAction action = new TestAction();
    ActionExecutingViewFactory factory = new ActionExecutingViewFactory(action);
    MockRequestContext context = new MockRequestContext();
    View view = factory.getView(context);
    assertFalse(action.isExecuted());
    view.render();
    assertTrue(action.isExecuted());
  }
View Full Code Here

  public void testProcessUserEvent() throws IOException {
    TestAction action = new TestAction();
    ActionExecutingViewFactory factory = new ActionExecutingViewFactory(action);
    MockRequestContext context = new MockRequestContext();
    View view = factory.getView(context);
    assertFalse(action.isExecuted());
    view.render();
    assertTrue(action.isExecuted());
    context.putRequestParameter("_eventId", "foo");
    view.processUserEvent();
    assertTrue(view.hasFlowEvent());
    assertEquals("foo", view.getFlowEvent().getId());
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.View

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.