automatic exposing of flow execution key in view root, so no need to post back manually now in jsf env
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
<sect2 id="executor-custom-repo">
|
||||
<title>A flow executor using a simple execution repository</title>
|
||||
<programlisting>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="simple"/>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="simple"/>
|
||||
</programlisting>
|
||||
<para>
|
||||
This executor is configured with a simple repository that manages
|
||||
@@ -175,7 +175,7 @@
|
||||
<sect2 id="executor-custom-repo2">
|
||||
<title>A flow executor using a client-side continuation-based execution repository</title>
|
||||
<programlisting>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="client"/>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="client"/>
|
||||
</programlisting>
|
||||
<para>
|
||||
This executor is configured with a continuation-based repository that serializes
|
||||
@@ -185,7 +185,7 @@
|
||||
<sect2 id="executor-custom-repo3">
|
||||
<title>A flow executor using a single key execution repository</title>
|
||||
<programlisting>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="singleKey"/>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry" repository-type="singleKey"/>>
|
||||
</programlisting>
|
||||
<para>
|
||||
This executor is configured with a simple repository that assigns a single
|
||||
@@ -193,6 +193,26 @@
|
||||
for the duration of the conversation.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 id="executor-custom-repo4">
|
||||
<title>A flow executor setting custom conversation management attributes</title>
|
||||
<programlisting>
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry">
|
||||
<flow:repository type="continuation" max-conversations="5" max-continuations="30" conversation-manager-ref="conversationManager"/>
|
||||
</flow:executor>
|
||||
|
||||
<bean id="conversationManager" class="example.MyCustomConversationalStateManager"/>
|
||||
</programlisting>
|
||||
<para>
|
||||
This executor is configured with a continuation repository configured with custom settings for:
|
||||
<orderedlist>
|
||||
<listitem><para>The maximum number of active conversations per user session (5)</para></listitem>
|
||||
<listitem><para>The maximum number of restorable flow execution snapshots (continuations) per conversation (30)</para></listitem>
|
||||
<listitem><para>Where conversational state will be stored (via a custom conversationManager)</para></listitem>
|
||||
</orderedlist>
|
||||
The <literal>flow:repository</literal> child element is the more flexible form for configuring the flow execution repository.
|
||||
Use it or the convenient <literal>repository-type</literal> attribute, not both.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 id="executor-excution-attributes">
|
||||
<title>A flow executor setting system execution attributes</title>
|
||||
<programlisting>
|
||||
@@ -227,7 +247,7 @@
|
||||
</flow-executor>
|
||||
|
||||
<!-- A FlowExecutionListener to observe the lifecycle of order-flow executions -->
|
||||
<bean id="listener" class="org.springframework.webflow.samples.sellitem.SellItemFlowExecutionListener"/>
|
||||
<bean id="listener" class="example.OrderFlowExecutionListener"/>
|
||||
</programlisting>
|
||||
<para>
|
||||
This executor is configured to apply the execution listener to the "order-flow".
|
||||
@@ -503,7 +523,8 @@
|
||||
<para>
|
||||
Spring Web Flow integrates with JSF. The JSF integration relies on custom implementations of
|
||||
core JSF artifacts such as navigation handler and phase listener to drive the
|
||||
execution of flows.
|
||||
execution of flows. In addition, it relies on custom Variable and Property Resolvers to
|
||||
access flow execution variables from JSF components.
|
||||
</para>
|
||||
<sect2 id="executor-jsf-simple">
|
||||
<title>A typical faces-config.xml file</title>
|
||||
@@ -513,18 +534,61 @@
|
||||
<navigation-handler>
|
||||
org.springframework.webflow.executor.jsf.FlowNavigationHandler
|
||||
</navigation-handler>
|
||||
<variable-resolver>
|
||||
org.springframework.webflow.executor.jsf.FlowExecutionVariableResolver
|
||||
</variable-resolver>
|
||||
<property-resolver>
|
||||
org.springframework.webflow.executor.jsf.FlowPropertyResolver
|
||||
org.springframework.webflow.executor.jsf.FlowExecutionPropertyResolver
|
||||
</property-resolver>
|
||||
</application>
|
||||
|
||||
<lifecycle>
|
||||
<phase-listener>org.springframework.webflow.executor.jsf.FlowPhaseListener</phase-listener>
|
||||
</lifecycle>
|
||||
</faces-config>
|
||||
</programlisting>
|
||||
</sect>
|
||||
<sect2 id="executor-jsf-launch-get">
|
||||
<title>Launching a flow execution - command link</title>
|
||||
<programlisting>
|
||||
<h:commandLink value="Go" action="flowId:myflow"/>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 id="executor-jsf-resume-form">
|
||||
<title>Resuming a flow execution - form bound to flow execution variables</title>
|
||||
<programlisting>
|
||||
<h:form id="form">
|
||||
...
|
||||
<h:inputText id="propertyName" value="#{flowExecution.flashScope.aFlashScopeAttribute}"/>
|
||||
<h:inputText id="propertyName" value="#{flowExecution.flowScope.aFlowScopeAttribute}"/>
|
||||
<h:inputText id="propertyName" value="#{flowExecution.conversationScope.aConversationScopeAttribute}"/>
|
||||
|
||||
<h:inputText id="propertyName" value="#{flowExecution.anAttributeToSearchForAcrossAllScopes}"/>
|
||||
...
|
||||
<input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}">
|
||||
<h:commandButton type="submit" value="Next" action="submit"/>
|
||||
</h:form>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 id="executor-jsf-simple">
|
||||
<title>A pre Spring Web Flow 1.0.2 faces-config.xml file</title>
|
||||
<para>
|
||||
Before Spring Web Flow 1.0.2 Spring Web Flow only supported resolving variables in flow scope
|
||||
(and not the other scopes such as flash and conversation shown above). This configuration is still supported
|
||||
for backwards compatibility reasons and follows:
|
||||
</para>
|
||||
<programlisting>
|
||||
<faces-config>
|
||||
<application>
|
||||
<navigation-handler>
|
||||
org.springframework.webflow.executor.jsf.FlowNavigationHandler
|
||||
</navigation-handler>
|
||||
<variable-resolver>
|
||||
org.springframework.webflow.executor.jsf.FlowVariableResolver
|
||||
</variable-resolver>
|
||||
<variable-resolver>
|
||||
org.springframework.web.jsf.DelegatingVariableResolver
|
||||
</variable-resolver>
|
||||
<variable-resolver>
|
||||
org.springframework.web.jsf.WebApplicationContextVariableResolver
|
||||
</variable-resolver>
|
||||
<property-resolver>
|
||||
org.springframework.webflow.executor.jsf.FlowPropertyResolver
|
||||
</property-resolver>
|
||||
</application>
|
||||
|
||||
<lifecycle>
|
||||
@@ -533,18 +597,12 @@
|
||||
</faces-config>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 id="executor-jsf-launch-get">
|
||||
<title>Launching a flow execution - command link</title>
|
||||
<programlisting>
|
||||
<h:commandLink value="Go" action="flowId:myflow"/>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 id="executor-jsf-resume-form">
|
||||
<title>Resuming a flow execution - form</title>
|
||||
<title>Resuming a flow execution - pre 1.0.2 form bound to flow scope variables</title>
|
||||
<programlisting>
|
||||
<h:form id="form">
|
||||
...
|
||||
<h:inputText id="propertyName" value="#{flowScope.managedBeanName.propertyName}"/>
|
||||
<h:inputText id="propertyName" value="#{flowScope.aFlowScopeAttribute}"/>
|
||||
...
|
||||
<input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}">
|
||||
<h:commandButton type="submit" value="Next" action="submit"/>
|
||||
|
||||
Reference in New Issue
Block a user