This release provides an upgrade path to Spring Framework 5 that in turn requires Java 8+, Servlet 3.1, Hibernate 5, Tiles 3. See the Spring Framework wiki for more details. The samples repository has been upgraded to Spring Web Flow 2.5.
As of 2.5 there is no longer a spring-js module. The classes from that module have been kept but moved to new packages in the spring-webflow module. The spring-js-resources module is available as an optional module that must be included explicitly.
This release requires JSF 2.2 or higher.
This release requires JDK 1.6.
Web Flow now supports a Java-based alternative for its system configuration. See the updated Chapter 10, System Setup.
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.
A flow definition can apply partial validation on the model through the validation-hints attribute supported on view state and transition elements.
HibernateFlowExecutionListener now supports Hibernate 4 in addition to Hibernate 3.
As of 2.4.4 the
HibernateFlowExecutionListener also works with Hibernate 5.
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.
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
<faces:resources> elements is
included as part of their Spring configuration.
This release deprecates Spring.js. The deprecation includes the entire
spring-js-resources module including Spring.js and
Spring-Dojo.js and the bundled Dojo and CSS Framework.
Also deprecated is the
from the spring-js module. The rest of spring-js,
AjaxTilesView, will be
folded into spring-webflow in a future release.
OGNL support is now deprecated.
By default Web Flow does a client-side redirect upon entering every view state. That makes it impossible to embed a flow on a page or within a modal dialog and execute more than one view state without causing a full-page refresh. Web Flow now supports launching a flow in "embedded" mode. In this mode a flow can transition to other view states without a client-side redirect during Ajax requests. See Section 11.7, “Embedding A Flow On A Page” and Section 13.6, “Embedding a Flow On a Page”.
Support for the JSR-303 Bean Validation API is now available building on equivalent support available in Spring MVC. See Section 5.10, “Validating a model” for more details.
Starting with Web Flow 2.3 a flow managed
PersistenceContext is automatically extended (propagated) to sub-flows assuming the subflow also has the feature enabled as well.
See Section 7.3, “Flow Managed Persistence And Sub-Flows”.
Support for Portlet 2.0 resource requests has now been added enabling Ajax requests with partial rendering.
URLs for such requests can be prepared with the
<portlet:resourceURL> tag in JSP pages.
Server-side processing is similar to a combined an action and a render requests but combined in a single request.
Unlike a render request, the response from a resource request includes content from the target portlet only.
<flow-execution-repository> element now provides a conversation-manager attribute accepting a reference to a ConversationManager instance.
By default Web Flow does a client-side redirect when remaining in the same view state as long as the current request is not an Ajax request. This is useful after form validation failure. Hitting Refresh or Back won't result in browser warnings. Hence this behavior is usually desirable. However a new flow execution attribute makes it possible to disable it and that may also be necessary in some cases specific to JSF applications. See Section 13.7, “Redirect In Same State”.
The process for building the samples included with the distribution has been simplified. Maven can be used to build all samples in one step. Eclipse settings include source code references to simplify debugging.
Additional samples can be accessed as follows:
mkdir spring-samples cd spring-samples svn co https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase cd webflow-primefaces-showcase mvn package # import into Eclipse
mkdir spring-samples cd spring-samples svn co https://src.springframework.org/svn/spring-samples/webflow-showcase cd webflow-showcase mvn package # import into Eclipse
Building on 2.1, Spring Web Flow version 2.2 adds support for core JSF 2 features The following features that were not supported in 2.1 are now available: partial state saving, JSF 2 resource request, handling, and JSF 2 Ajax requests. At this point support for JSF 2 is considered comprehensive although not covering every JSF 2 feature -- excluded are mostly features that overlap with the core value Web Flow provides such as those relating to navigation and state management.
See Section 13.3, “Configuring Web Flow for use with JSF” for important configuration changes.
Note that partial state saving is only supported with Sun Mojarra 2.0.3 or later.
It is not yet supported with Apache MyFaces. This is due to the
fact MyFaces was not as easy to customize with regards to how component state is stored.
We will work with Apache MyFaces to provide this support. In the mean time you will need to use
javax.faces.PARTIAL_STATE_SAVING context parameter in
to disable partial state saving with Apache MyFaces.
The main Spring Travel sample demonstrating Spring Web Flow and JSF support is now built on JSF 2 and components from the PrimeFaces component library. Please check out the booking-faces sample in the distribution.
svn co https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase cd webflow-primefaces-showcase mvn package
A new Spring Security tag library is available for use with with JSF 2.0 or with JSF 1.2 Facelets views. It provides an <authorize> tag as well as several EL functions. See Section 13.9, “Using the Spring Security Facelets Tag Library” for more details.
Starting with Spring 3.0.4, the Spring Framework includes a replacement for the ResourcesServlet. Please see the Spring Framework documentation for details on the custom mvc namespace, specifically the new "resources" element.
The bundled custom Dojo build is upgraded to version 1.5. It now includes dojox.
Note that applications are generally encouraged to prepare their own custom Dojo build for optimized performance depending on what parts of Dojo are commonly used together. For examples see the scripts used by Spring Web Flow to prepare its own custom Dojo build.
spring-js artifact has been split in two -- the new artifact
spring-js-resources) contains client side resource (.js, .css, etc.) while
the existing artifact (
spring-js) contains server-side Java code only.
Applications preparing their own custom Dojo build have an option now to
spring-js-resources and put
Spring-Dojo.js directly under the root of their web application.
Bundled client resources (.js, .css, etc.)
have been moved to
META-INF/web-resources from their previous location
META-INF. This change is transparent for applications but will result
in simpler and safer configuration when using the new resource handling
mechanism available in Spring 3.0.4.
In previous versions of Spring Web Flow support for JSF Portlets relied on a Portlet Bridge for JSF implementation and was considered experimental. Spring Web Flow 2.2 adds support for JSF Portlets based on its own internal Portlet integration targeting Portlet API 2.0 and JSF 1.2 environments. See ??? for more details. The Spring Web Flow Travel JSF Portlets sample has been successfully tested on the Apache Pluto portal container.