Update reference with Java config examples
This commit is contained in:
@@ -207,11 +207,11 @@ xsi:schemaLocation="
|
||||
xmlns:faces="http://www.springframework.org/schema/faces"
|
||||
si:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/webflow-config
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd
|
||||
http://www.springframework.org/schema/faces
|
||||
http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">
|
||||
http://www.springframework.org/schema/faces/spring-faces-2.4.xsd">
|
||||
|
||||
<!-- Executes flows: the central entry point into the Spring Web Flow system -->
|
||||
<webflow:flow-executor id="flowExecutor">
|
||||
@@ -251,9 +251,9 @@ xsi:schemaLocation="
|
||||
xmlns:faces="http://www.springframework.org/schema/faces"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/faces
|
||||
http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">
|
||||
http://www.springframework.org/schema/faces/spring-faces-2.4.xsd">
|
||||
|
||||
<faces:resources />
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
|
||||
|
||||
<mvc:annotation-driven/>
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
|
||||
|
||||
...
|
||||
|
||||
|
||||
@@ -14,11 +14,14 @@
|
||||
This chapter shows you how to setup the Web Flow system for use in any web environment.
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 xml:id="system-config-schema">
|
||||
<title>webflow-config.xsd</title>
|
||||
<sect1 xml:id="system-config-options">
|
||||
<title>Java Config and XML Namespace</title>
|
||||
<para>
|
||||
Web Flow provides a Spring schema that allows you to configure the system.
|
||||
To use this schema, include it in one of your infrastructure-layer beans files:
|
||||
Web Flow provides dedicated configuration support for both Java and
|
||||
XML-based configuration.
|
||||
</para>
|
||||
<para>
|
||||
To get started with XML based configuration declare the webflow config XML namespace:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
@@ -26,14 +29,27 @@
|
||||
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/webflow-config
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd">
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd">
|
||||
|
||||
<!-- Setup Web Flow here -->
|
||||
|
||||
</beans>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
To get started with Java configuration extend
|
||||
<classname>AbstractFlowConfiguration</classname> in an
|
||||
<classname>@Configuration</classname> class:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class WebFlowConfig extends AbstractFlowConfiguration {
|
||||
|
||||
}]]>
|
||||
</programlisting>
|
||||
</sect1>
|
||||
<sect1 xml:id="system-config-basic">
|
||||
<title>Basic system configuration</title>
|
||||
@@ -43,21 +59,41 @@
|
||||
<sect2 xml:id="basic-setup-flow-registry">
|
||||
<title>FlowRegistry</title>
|
||||
<para>
|
||||
Register your flows in a <code>FlowRegistry</code>:
|
||||
Register your flows in a <code>FlowRegistry</code> in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-registry id="flowRegistry">
|
||||
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" />
|
||||
</webflow:flow-registry>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Register your flows in a <code>FlowRegistry</code> in Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowDefinitionRegistry flowRegistry() {
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.addFlowLocation("/WEB-INF/flows/booking/booking.xml")
|
||||
.build();
|
||||
}]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="basic-setup-flow-executor">
|
||||
<title>FlowExecutor</title>
|
||||
<para>
|
||||
Deploy a FlowExecutor, the central service for executing flows:
|
||||
Deploy a FlowExecutor, the central service for executing flows in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-executor id="flowExecutor" />]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Deploy a FlowExecutor, the central service for executing flows in Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowExecutor flowExecutor() {
|
||||
return getFlowExecutorBuilder(flowRegistry()).build();
|
||||
}]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
See the Spring MVC and Spring Faces sections of this guide on how to integrate the Web Flow system with the MVC and JSF environment, respectively.
|
||||
@@ -73,25 +109,48 @@
|
||||
<title>Specifying flow locations</title>
|
||||
<para>
|
||||
Use the <code>location</code> element to specify paths to flow definitions to register.
|
||||
By default, flows will be assigned registry identifiers equal to their filenames minus the file extension, unless a registry bath path is defined.
|
||||
By default, flows will be assigned registry identifiers equal to their filenames minus
|
||||
the file extension, unless a registry bath path is defined.
|
||||
</para>
|
||||
<para>
|
||||
In XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" />]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.addFlowLocation("/WEB-INF/flows/booking/booking.xml")
|
||||
.build();]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="flow-registry-location-id">
|
||||
<title>Assigning custom flow identifiers</title>
|
||||
<para>
|
||||
Specify an id to assign a custom registry identifier to a flow:
|
||||
Specify an id to assign a custom registry identifier to a flow in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" id="bookHotel" />]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Specify an id to assign a custom registry identifier to a flow in Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.addFlowLocation("/WEB-INF/flows/booking/booking.xml", "bookHotel")
|
||||
.build();]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="flow-registry-location-attributes">
|
||||
<title>Assigning flow meta-attributes</title>
|
||||
<para>
|
||||
Use the <code>flow-definition-attributes</code> element to assign custom meta-attributes to a registered flow:
|
||||
Use the <code>flow-definition-attributes</code> element to assign custom meta-attributes to a registered flow.
|
||||
</para>
|
||||
<para>
|
||||
In XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml">
|
||||
@@ -100,15 +159,36 @@
|
||||
</webflow:flow-definition-attributes>
|
||||
</webflow:flow-location>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
Map<String, Object> attrs = ... ;
|
||||
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.addFlowLocation("/WEB-INF/flows/booking/booking.xml", null, attrs)
|
||||
.build();]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="flow-registry-patterns">
|
||||
<title>Registering flows using a location pattern</title>
|
||||
<para>
|
||||
Use the <code>flow-location-patterns</code> element to register flows that match a specific resource location pattern:
|
||||
</para>
|
||||
<para>
|
||||
In XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-location-pattern value="/WEB-INF/flows/**/*-flow.xml" />]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.addFlowLocationPattern("/WEB-INF/flows/**/*-flow.xml")
|
||||
.build();]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="flow-registry-base-path">
|
||||
<title>Flow location base path</title>
|
||||
@@ -117,10 +197,22 @@
|
||||
All flow locations are then relative to the base path.
|
||||
The base path can be a resource path such as '/WEB-INF' or a location on the classpath like 'classpath:org/springframework/webflow/samples'.
|
||||
</para>
|
||||
<para>
|
||||
In XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-registry id="flowRegistry" base-path="/WEB-INF">
|
||||
<webflow:flow-location path="/hotels/booking/booking.xml" />
|
||||
</webflow:flow-registry>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.setBasePath("/WEB-INF")
|
||||
.addFlowLocationPattern("/hotels/booking/booking.xml")
|
||||
.build();]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
With a base path defined, the algorithm that assigns flow identifiers changes slightly.
|
||||
@@ -142,12 +234,21 @@
|
||||
<para>
|
||||
Location patterns are particularly powerful when combined with a registry base path.
|
||||
Instead of the flow identifiers becoming '*-flow', they will be based on the directory path.
|
||||
For example:
|
||||
For example in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-registry id="flowRegistry" base-path="/WEB-INF">
|
||||
<webflow:flow-location-pattern value="/**/*-flow.xml" />
|
||||
</webflow:flow-registry>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.setBasePath("/WEB-INF")
|
||||
.addFlowLocationPattern("/**/*-flow.xml")
|
||||
.build();]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In the above example, suppose you had flows located in <code>/user/login</code>, <code>/user/registration</code>, <code>/hotels/booking</code>, and <code>/flights/booking</code> directories within <code>WEB-INF</code>,
|
||||
@@ -160,6 +261,9 @@
|
||||
Use the <code>parent</code> attribute to link two flow registries together in a hierarchy.
|
||||
When the child registry is queried, if it cannot find the requested flow it will delegate to its parent.
|
||||
</para>
|
||||
<para>
|
||||
In XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<!-- my-system-config.xml -->
|
||||
<webflow:flow-registry id="flowRegistry" parent="sharedFlowRegistry">
|
||||
@@ -171,6 +275,36 @@
|
||||
<!-- Global flows shared by several applications -->
|
||||
</webflow:flow-registry>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Configuration
|
||||
public class WebFlowConfig extends AbstractFlowConfiguration {
|
||||
|
||||
@Autowired
|
||||
private SharedConfig sharedConfig;
|
||||
|
||||
@Bean
|
||||
public FlowDefinitionRegistry flowRegistry() {
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.setParent(this.sharedConfig.sharedFlowRegistry())
|
||||
.addFlowLocation("/WEB-INF/flows/booking/booking.xml")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
public class SharedConfig extends AbstractFlowConfiguration {
|
||||
|
||||
@Bean
|
||||
public FlowDefinitionRegistry sharedFlowRegistry() {
|
||||
return getFlowDefinitionRegistryBuilder()
|
||||
.addFlowLocation("/WEB-INF/flows/shared.xml")
|
||||
.build();
|
||||
}
|
||||
}]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="flow-registry-builder-services">
|
||||
<title>Configuring custom FlowBuilder services</title>
|
||||
@@ -179,16 +313,34 @@
|
||||
If no flow-builder-services tag is specified, the default service implementations are used.
|
||||
When the tag is defined, you only need to reference the services you want to customize.
|
||||
</para>
|
||||
<para>In XML:</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
|
||||
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" />
|
||||
</webflow:flow-registry>
|
||||
|
||||
<webflow:flow-builder-services id="flowBuilderServices" />]]>
|
||||
</programlisting>
|
||||
<para>In Java:</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowDefinitionRegistry flowRegistry() {
|
||||
return getFlowDefinitionRegistryBuilder(flowBuilderServices())
|
||||
.addFlowLocation("/WEB-INF/flows/booking/booking.xml")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public FlowBuilderServices flowBuilderServices() {
|
||||
return getFlowBuilderServicesBuilder().build();
|
||||
}]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The configurable services are the <code>conversion-service</code>, <code>expression-parser</code>, and <code>view-factory-creator</code>.
|
||||
These services are configured by referencing custom beans you define. For example:
|
||||
These services are configured by referencing custom beans you define.
|
||||
</para>
|
||||
<para>
|
||||
For example in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-builder-services id="flowBuilderServices"
|
||||
@@ -199,6 +351,32 @@
|
||||
<bean id="conversionService" class="..." />
|
||||
<bean id="expressionParser" class="..." />
|
||||
<bean id="viewFactoryCreator" class="..." />]]>
|
||||
</programlisting>
|
||||
<para>In Java:</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowBuilderServices flowBuilderServices() {
|
||||
return getFlowBuilderServicesBuilder()
|
||||
.setConversionService(conversionService())
|
||||
.setExpressionParser(expressionParser)
|
||||
.setViewFactoryCreator(mvcViewFactoryCreator())
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConversionService conversionService() {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ExpressionParser expressionParser() {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewFactoryCreator viewFactoryCreator() {
|
||||
// ...
|
||||
}]]>
|
||||
</programlisting>
|
||||
<sect3 xml:id="builder-service-conversion">
|
||||
<title>conversion-service</title>
|
||||
@@ -245,7 +423,8 @@
|
||||
<sect2 xml:id="flow-executor-execution-listeners">
|
||||
<title>Attaching flow execution listeners</title>
|
||||
<para>
|
||||
Use the <code>flow-execution-listeners</code> element to register listeners that observe the lifecycle of flow executions:
|
||||
Use the <code>flow-execution-listeners</code> element to register listeners that observe the lifecycle
|
||||
of flow executions. For example in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-execution-listeners>
|
||||
@@ -254,21 +433,57 @@
|
||||
</webflow:flow-execution-listeners>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
You may also configure a listener to observe only certain flows:
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowExecutor flowExecutor() {
|
||||
return getFlowExecutorBuilder(flowRegistry())
|
||||
.addFlowExecutionListener(securityListener())
|
||||
.addFlowExecutionListener(persistenceListener())
|
||||
.build();
|
||||
}]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
You may also configure a listener to observe only certain flows. For example in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:listener ref="securityListener" criteria="securedFlow1,securedFlow2"/>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowExecutor flowExecutor() {
|
||||
return getFlowExecutorBuilder(flowRegistry())
|
||||
.addFlowExecutionListener(securityListener(), "securedFlow1,securedFlow2")
|
||||
.build();
|
||||
}]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
<sect2 xml:id="tuning-flow-execution-repository">
|
||||
<title>Tuning FlowExecution persistence</title>
|
||||
<para>
|
||||
Use the <code>flow-execution-repository</code> element to tune flow execution persistence settings:
|
||||
Use the <code>flow-execution-repository</code> element to tune flow execution persistence settings.
|
||||
For example in XML:
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
|
||||
<webflow:flow-execution-repository max-executions="5" max-execution-snapshots="30" />
|
||||
</webflow:flow-executor>]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
In Java:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[
|
||||
@Bean
|
||||
public FlowExecutor flowExecutor() {
|
||||
return getFlowExecutorBuilder(flowRegistry())
|
||||
.setMaxFlowExecutions(5)
|
||||
.setMaxFlowExecutionSnapshots(30)
|
||||
.build();
|
||||
}]]>
|
||||
</programlisting>
|
||||
<sect3 xml:id="repository-max-executions">
|
||||
<title>max-executions</title>
|
||||
|
||||
@@ -125,9 +125,9 @@ java org.springframework.webflow.upgrade.WebFlowUpgrader flow-to-upgrade.xml
|
||||
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/webflow-config
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd">
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd">
|
||||
]]></programlisting>
|
||||
<sect3 xml:id="upgrade-guide-webflow-config-schema-executor">
|
||||
<title>flow-executor</title>
|
||||
|
||||
@@ -241,9 +241,9 @@ public class ApplicationConversionService extends DefaultConversionService {
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
|
||||
|
||||
<mvc:annotation-driven/>
|
||||
]]>
|
||||
@@ -288,9 +288,9 @@ public class ApplicationConversionServiceFactoryBean extends FormattingConversio
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
|
||||
|
||||
<mvc:annotation-driven conversion-service="applicationConversionService" />
|
||||
|
||||
|
||||
@@ -10,11 +10,59 @@
|
||||
<title>What's New</title>
|
||||
<sect1 xml:id="whatsnew-swf-240">
|
||||
<title>Spring Web Flow 2.4</title>
|
||||
<para>This release requires JDK 1.6.</para>
|
||||
<sect2 xml:id="whatsnew-swf-java-config">
|
||||
<title>Java-based Configuration</title>
|
||||
<para>
|
||||
Web Flow now supports a Java-based alternative for its system configuration.
|
||||
See the updated <xref linkend="system-setup" />.
|
||||
</para>
|
||||
<para>
|
||||
Also see the
|
||||
<link xl:href="https://github.com/spring-projects/spring-webflow-samples/tree/master/booking-mvc">booking-mvc</link> and
|
||||
<link xl:href="https://github.com/spring-projects/spring-webflow-samples/tree/master/booking-faces">booking-faces</link>
|
||||
samples that have been updated to use all Java config.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-swf-mvcflash">
|
||||
<title>Spring MVC Flash Scope Integration</title>
|
||||
<para>
|
||||
When a flow ends it can now redirect to a Spring MVC controller after saving
|
||||
attributes in Spring MVC's flash scope for the controller to access.
|
||||
</para>
|
||||
<para>
|
||||
See <xref linkend="spring-mvc-flash-output"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-partial-validation">
|
||||
<title>Partial JSR-303 Bean Validation</title>
|
||||
<para>
|
||||
A flow definition can apply partial validation on the model through the validation-hints
|
||||
attribute supported on view state and transition elements.
|
||||
</para>
|
||||
<para>
|
||||
See <xref linkend="view-validation-jsr303-partial" />.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-hibernate4">
|
||||
<title>Hibernate4 Support</title>
|
||||
<para>
|
||||
The <classname>HibernateFlowExecutionListener</classname> now supports Hibernate 4 in addition to Hibernate 3.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-tiles3">
|
||||
<title>Tiles 3 Support</title>
|
||||
<para>
|
||||
The <classname>AjaxTilesView</classname> now supports Tiles 3 in addition to Tiles 2.2.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-swf-jsf20">
|
||||
<title>Minimum JSF 2.0 Requirement</title>
|
||||
<para>
|
||||
Java ServerFaces version 1.2 and earlier are no longer supported by Spring Web Flow, if you have not done so already you will need to upgrade to JSF 2.0 or above.
|
||||
In addition the Spring Faces components that were previously provided with JSF 1.2 for progressive AJAX enhancements have been removed in this release.
|
||||
</para>
|
||||
<para>
|
||||
See <xref linkend="spring-faces-upgrade-from-swf23"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
@@ -24,20 +72,10 @@
|
||||
The internal Portlet integration introduced in Spring Web Flow 2.2 has been upgraded for JSF 2.0 compatibility.
|
||||
Some of the more advanced JSF 2.0 features, such as partial state saving, are not supported in a Portlet environment, however, existing application can now upgrade to the minimum required JSF version.
|
||||
Upgraded projects will need to ensure that the <code><faces:resources></code> elements is
|
||||
included as part of their Spring configuration. See <xref linkend="portlet-jsf"/>.
|
||||
included as part of their Spring configuration.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-swf-mvcflash">
|
||||
<title>Saving Flow Output to Spring MVC Flash Scope</title>
|
||||
<para>
|
||||
Flow output can now be saved to Spring MVC Flash Scope for any <code>end-state</code> that issues an internal redirect. To enable this feature set <code>FlowHandlerAdapter.saveOutputToFlashScopeOnRedirect</code>. See <xref linkend="spring-mvc-flash-output"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="whatsnew-partial-validation">
|
||||
<title>Partial JSR-303 Bean Validation</title>
|
||||
<para>
|
||||
Partial validation with JSR-303 Bean Validation groups is now supported through the validation-hints
|
||||
view-state attribute. See <xref linkend="view-validation-jsr303-partial" />.
|
||||
See <xref linkend="portlet-jsf"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
Reference in New Issue
Block a user