Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.ViewFactory


  public void testViewStateExternalRedirect() {
    ViewStateModel state = new ViewStateModel("view");
    state.setView("externalRedirect:http://www.paypal.com?_callbackUrl=#{flowExecutionUri}");
    model.setStates(asList(AbstractStateModel.class, state));
    Flow flow = getFlow(model);
    ViewFactory vf = ((ViewState) flow.getStateInstance("view")).getViewFactory();
    assertTrue(vf instanceof ActionExecutingViewFactory);
    ActionExecutingViewFactory avf = (ActionExecutingViewFactory) vf;
    assertTrue(avf.getAction() instanceof ExternalRedirectAction);
  }
View Full Code Here


    assertSame(bean, actual.getValue());
  }

  protected void initView(MockRequestContext requestContext) {
    ((MockFlowSession) requestContext.getFlowExecutionContext().getActiveSession()).setState(new ViewState(
        requestContext.getRootFlow(), "view", new ViewFactory() {
          public View getView(RequestContext context) {
            throw new UnsupportedOperationException("Not implemented");
          }
        }));
  }
View Full Code Here

      mapping.setRequired(required);
    }
  }

  private void parseAndAddViewState(ViewStateModel state, Flow flow) {
    ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), false, state.getBinder());
    Boolean redirect = null;
    if (StringUtils.hasText(state.getRedirect())) {
      redirect = (Boolean) fromStringTo(Boolean.class).execute(state.getRedirect());
    }
    boolean popup = false;
View Full Code Here

    if (StringUtils.hasText(state.getCommit())) {
      attributes.put("commit", fromStringTo(Boolean.class).execute(state.getCommit()));
    }
    parseAndPutSecured(state.getSecured(), attributes);
    Action finalResponseAction;
    ViewFactory viewFactory = parseViewFactory(state.getView(), state.getId(), true, null);
    if (viewFactory != null) {
      finalResponseAction = new ViewFactoryActionAdapter(viewFactory);
    } else {
      finalResponseAction = null;
    }
View Full Code Here

TOP

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

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.