Chapter 2. What's New

Table of Contents

Spring Web Flow 2.3
Embedding A Flow On A Page
Support For JSR-303 Bean Validation
Flow-Managed Persistence Context Propagation
Portlet 2.0 Resource Requests
Custom ConversationManager
Redirect In Same State
Samples
Spring Web Flow 2.2
JSF 2 Support
Spring Security Facelets Tag Library
Spring JavaScript Updates
JFS Portlet Support

Spring Web Flow 2.3

Embedding A Flow On A Page

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 the section called “Embedding A Flow On A Page” and the section called “Embedding a Flow On a Page”.

Support For JSR-303 Bean Validation

Support for the JSR-303 Bean Validation API is now available building on equivalent support available in Spring MVC. See the section called “Validating a model” for more details.

Flow-Managed Persistence Context Propagation

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 the section called “Flow Managed Persistence And Sub-Flows”.

Portlet 2.0 Resource Requests

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.

Custom ConversationManager

The <flow-execution-repository> element now provides a conversation-manager attribute accepting a reference to a ConversationManager instance.

Redirect In Same State

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 2 applications. See the section called “Redirect In Same State”.

Samples

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