Tabnine Logo
ViewState.setRedirect
Code IndexAdd Tabnine to your IDE (free)

How to use
setRedirect
method
in
org.springframework.webflow.engine.ViewState

Best Java code snippets using org.springframework.webflow.engine.ViewState.setRedirect (Showing top 7 results out of 315)

origin: org.springframework.webflow/spring-webflow

/**
 * Factory method that creates a new view state, a state where a user is allowed to participate in the flow. This
 * method is an atomic operation that returns a fully initialized state. It encapsulates the selection of the view
 * state implementation as well as the state assembly.
 * @param id the identifier to assign to the state, must be unique to its owning flow (required)
 * @param flow the flow that will own (contain) this state (required)
 * @param entryActions any state entry actions; may be null
 * @param viewFactory the state view factory strategy
 * @param redirect whether to send a flow execution redirect before rendering
 * @param popup whether to display the view in a popup window
 * @param renderActions any 'render actions' to execute on entry and refresh; may be null
 * @param transitions any transitions (paths) out of this state; may be null
 * @param exceptionHandlers any exception handlers; may be null
 * @param exitActions any state exit actions; may be null
 * @param attributes attributes to assign to the State, which may also be used to affect state construction; may be
 * null
 * @return the fully initialized view state instance
 */
public State createViewState(String id, Flow flow, ViewVariable[] variables, Action[] entryActions,
    ViewFactory viewFactory, Boolean redirect, boolean popup, Action[] renderActions, Transition[] transitions,
    FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap<?> attributes) {
  ViewState viewState = new ViewState(flow, id, viewFactory);
  viewState.addVariables(variables);
  viewState.setRedirect(redirect);
  viewState.setPopup(popup);
  viewState.getRenderActionList().addAll(renderActions);
  configureCommonProperties(viewState, entryActions, transitions, exceptionHandlers, exitActions, attributes);
  return viewState;
}
origin: spring-projects/spring-webflow

/**
 * Factory method that creates a new view state, a state where a user is allowed to participate in the flow. This
 * method is an atomic operation that returns a fully initialized state. It encapsulates the selection of the view
 * state implementation as well as the state assembly.
 * @param id the identifier to assign to the state, must be unique to its owning flow (required)
 * @param flow the flow that will own (contain) this state (required)
 * @param entryActions any state entry actions; may be null
 * @param viewFactory the state view factory strategy
 * @param redirect whether to send a flow execution redirect before rendering
 * @param popup whether to display the view in a popup window
 * @param renderActions any 'render actions' to execute on entry and refresh; may be null
 * @param transitions any transitions (paths) out of this state; may be null
 * @param exceptionHandlers any exception handlers; may be null
 * @param exitActions any state exit actions; may be null
 * @param attributes attributes to assign to the State, which may also be used to affect state construction; may be
 * null
 * @return the fully initialized view state instance
 */
public State createViewState(String id, Flow flow, ViewVariable[] variables, Action[] entryActions,
    ViewFactory viewFactory, Boolean redirect, boolean popup, Action[] renderActions, Transition[] transitions,
    FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap<?> attributes) {
  ViewState viewState = new ViewState(flow, id, viewFactory);
  viewState.addVariables(variables);
  viewState.setRedirect(redirect);
  viewState.setPopup(popup);
  viewState.getRenderActionList().addAll(renderActions);
  configureCommonProperties(viewState, entryActions, transitions, exceptionHandlers, exitActions, attributes);
  return viewState;
}
origin: org.springframework.webflow/org.springframework.webflow

/**
 * Factory method that creates a new view state, a state where a user is allowed to participate in the flow. This
 * method is an atomic operation that returns a fully initialized state. It encapsulates the selection of the view
 * state implementation as well as the state assembly.
 * @param id the identifier to assign to the state, must be unique to its owning flow (required)
 * @param flow the flow that will own (contain) this state (required)
 * @param entryActions any state entry actions; may be null
 * @param viewFactory the state view factory strategy
 * @param redirect whether to send a flow execution redirect before rendering
 * @param popup whether to display the view in a popup window
 * @param renderActions any 'render actions' to execute on entry and refresh; may be null
 * @param transitions any transitions (paths) out of this state; may be null
 * @param exceptionHandlers any exception handlers; may be null
 * @param exitActions any state exit actions; may be null
 * @param attributes attributes to assign to the State, which may also be used to affect state construction; may be
 * null
 * @return the fully initialized view state instance
 */
public State createViewState(String id, Flow flow, ViewVariable[] variables, Action[] entryActions,
    ViewFactory viewFactory, Boolean redirect, boolean popup, Action[] renderActions, Transition[] transitions,
    FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes) {
  ViewState viewState = new ViewState(flow, id, viewFactory);
  viewState.addVariables(variables);
  viewState.setRedirect(redirect);
  viewState.setPopup(popup);
  viewState.getRenderActionList().addAll(renderActions);
  configureCommonProperties(viewState, entryActions, transitions, exceptionHandlers, exitActions, attributes);
  return viewState;
}
origin: spring-projects/spring-webflow

public void testEnterViewStateWithNoLocalRedirect() {
  Flow flow = new Flow("myFlow");
  StubViewFactory viewFactory = new StubViewFactory();
  ViewState state = new ViewState(flow, "viewState", viewFactory);
  state.setRedirect(false);
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.getFlashScope().put("foo", "bar");
  state.enter(context);
  assertTrue("Render called", context.getFlowScope().contains("renderCalled"));
  assertFalse(context.getMockExternalContext().getFlowExecutionRedirectRequested());
  assertFalse(context.getFlashScope().contains("foo"));
}
origin: spring-projects/spring-webflow

public void testEnterViewStateWithLocalRedirect() {
  Flow flow = new Flow("myFlow");
  StubViewFactory viewFactory = new StubViewFactory();
  ViewState state = new ViewState(flow, "viewState", viewFactory);
  state.setRedirect(true);
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.getFlashScope().put("foo", "bar");
  state.enter(context);
  assertFalse("Render called", context.getFlowScope().contains("renderCalled"));
  assertTrue(context.getMockExternalContext().getFlowExecutionRedirectRequested());
  assertTrue(context.getFlashScope().contains("foo"));
}
origin: spring-projects/spring-webflow

public void testViewStateRedirectOverridesEmbeddedMode() {
  Flow flow = new Flow("myFlow");
  StubViewFactory viewFactory = new StubViewFactory();
  ViewState state = new ViewState(flow, "viewState", viewFactory);
  state.setRedirect(false);
  Transition t = new Transition(on("submit"), null);
  state.getTransitionSet().add(t);
  MockRequestControlContext context = new MockRequestControlContext(flow);
  state.enter(context);
  context.getMockExternalContext().setAjaxRequest(true);
  context.setEmbeddedMode();
  context.setAlwaysRedirectOnPause(true);
  context.setRedirectInSameState(true);
  assertFalse(context.getMockExternalContext().getFlowExecutionRedirectRequested());
}
origin: spring-projects/spring-webflow

public void testEnterViewStateRedirectInPopup() {
  Flow flow = new Flow("myFlow");
  StubViewFactory viewFactory = new StubViewFactory();
  ViewState state = new ViewState(flow, "viewState", viewFactory);
  state.setRedirect(true);
  state.setPopup(true);
  MockRequestControlContext context = new MockRequestControlContext(flow);
  context.getFlashScope().put("foo", "bar");
  state.enter(context);
  assertFalse("Render called", context.getFlowScope().contains("renderCalled"));
  assertTrue(context.getMockExternalContext().getFlowExecutionRedirectRequested());
  assertTrue(context.getMockExternalContext().getRedirectInPopup());
  assertTrue(context.getFlashScope().contains("foo"));
}
org.springframework.webflow.engineViewStatesetRedirect

Javadoc

Sets whether this view state should requests a flow execution redirect when entered.

Popular methods of ViewState

  • <init>
    Create a new view state.
  • getId
  • getRenderActionList
    Returns the list of actions executable by this view state on entry and on refresh. The returned list
  • getViewFactory
    Returns the view factory.
  • addVariable
    Adds a view variable.
  • resume
  • setPopup
    Sets whether this view state should render as a popup.
  • addVariables
    Adds a set of view variables.
  • createVariables
  • destroyVariables
  • getEntryActionList
  • getOwner
  • getEntryActionList,
  • getOwner,
  • refresh,
  • render,
  • restoreVariables,
  • shouldRedirect,
  • updateHistory,
  • clearFlash,
  • getRedirect

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now