Spring Web Flow Reference Guide

Keith Donald

Erwin Vervaet

Jeremy Grelle

Scott Andrews

Rossen Stoyanchev

Spring Web Flow

Version 2.0.8

August 2009

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.


Table of Contents

Preface
1. Introduction
1.1. What this guide covers
1.2. What Web Flow requires to run
1.3. Where to get support
1.4. Where to follow development
1.5. How to access Web Flow artifacts from Maven Central
1.6. How to access Web Flow artifacts from the SpringSource Bundle Repository
1.7. How to access nightly builds
2. Defining Flows
2.1. Introduction
2.2. What is a flow?
2.3. What is the makeup of a typical flow?
2.4. How are flows authored?
2.5. Essential language elements
2.6. Actions
2.7. Input/Output Mapping
2.8. Variables
2.9. Calling subflows
3. Expression Language (EL)
3.1. Introduction
3.2. Supported EL implementations
3.3. EL portability
3.4. EL usage
3.5. Special EL variables
3.6. Scope searching algorithm
4. Rendering views
4.1. Introduction
4.2. Defining view states
4.3. Specifying view identifiers
4.4. View scope
4.5. Executing render actions
4.6. Binding to a model
4.7. Performing type conversion
4.8. Suppressing binding
4.9. Specifying bindings explicitly
4.10. Validating a model
4.11. Suppressing validation
4.12. Executing view transitions
4.13. Working with messages
4.14. Displaying popups
4.15. View backtracking
5. Executing actions
5.1. Introduction
5.2. Defining action states
5.3. Defining decision states
5.4. Action outcome event mappings
5.5. Action implementations
5.6. Action exceptions
5.7. Other Action execution examples
6. Flow Managed Persistence
6.1. Introduction
6.2. FlowScoped PersistenceContext
7. Securing Flows
7.1. Introduction
7.2. How do I secure a flow?
7.3. The secured element
7.4. The SecurityFlowExecutionListener
7.5. Configuring Spring Security
8. Flow Inheritance
8.1. Introduction
8.2. Is flow inheritance like Java inheritance?
8.3. Types of Flow Inheritance
8.4. Abstract flows
8.5. Inheritance Algorithm
9. System Setup
9.1. Introduction
9.2. webflow-config.xsd
9.3. Basic system configuration
9.4. flow-registry options
9.5. flow-executor options
10. Spring MVC Integration
10.1. Introduction
10.2. Configuring web.xml
10.3. Dispatching to flows
10.4. Implementing custom FlowHandlers
10.5. View Resolution
10.6. Signaling an event from a View
11. Spring JavaScript Quick Reference
11.1. Introduction
11.2. Serving Javascript Resources
11.3. Including Spring Javascript in a Page
11.4. Spring Javascript Decorations
11.5. Handling Ajax Requests
12. JSF Integration
12.1. Introduction
12.2. Spring-centric Integration Approach
12.3. Configuring web.xml
12.4. Configuring Web Flow to render JSF views
12.5. Configuring faces-config.xml
12.6. Replacing the JSF Managed Bean Facility
12.7. Handling JSF Events With Spring Web Flow
12.8. Enhancing The User Experience With Rich Web Forms
12.9. Third-Party Component Library Integration
13. Portlet Integration
13.1. Introduction
13.2. Configuring web.xml and portlet.xml
13.3. Configuring Spring
13.4. Portlet Views
13.5. Portlet Modes and Window States
13.6. Issues in a Portlet Environment
14. Testing flows
14.1. Introduction
14.2. Extending AbstractXmlFlowExecutionTests
14.3. Specifying the path to the flow to test
14.4. Registering flow dependencies
14.5. Testing flow startup
14.6. Testing flow event handling
14.7. Mocking a subflow
15. Upgrading from 1.0
15.1. Introduction
15.2. Flow Definition Language
15.3. Web Flow Configuration
15.4. New Web Flow Concepts
A. Flow Definition Language 1.0 to 2.0 Mappings