作者:手机用户2602913827 | 来源:互联网 | 2023-09-17 15:52
本文整理了Java中org.springframework.webflow.engine.ViewState.setPopup()
方法的一些代码示例,展示了ViewState.setPopup()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewState.setPopup()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.ViewState
类名称:ViewState
方法名:setPopup
[英]Sets whether this view state should render as a popup.
[中]设置此视图状态是否应呈现为弹出窗口。
代码示例
代码示例来源: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 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"));
}