However, you have not defined the mapping between that identifier and a specific Action
implementation. This is where the existing Spring infrastructure comes in, as Spring Web Flow
uses Spring to drive configuration of flow artifacts such as Action. Refer to Listing 11-5.
Listing 11-5./WEB-INF/flows/purchase-flow.xmlImporting Spring Beans
Listing 11-6 is the contents of /WEB-INF/flow/purchase-flow-context.xml.
Listing 11-6./WEB-INF/flow/purchase-flow-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
By using the importelement, you can pull in any number of files containing bean defini-
tions that define artifacts local to the flow definition. These imported bean definitions also
have full access to the beans defined in the parent WebApplicationContext, typically the
DispatcherServletcontext.
In this case formActioncorresponds to a singleton instance of org.springframework.
webflow.action.FormAction. This action is a MultiActionimplementation that provides a
number of action methods related to form processing, including setupFormfor executing form
prerender logic and bindAndValidatefor executing form postback logic.
CHAPTER 11 ■INTRODUCTION TO SPRING WEB FLOW 323