JSF 2.2 Faces flows
JSF 2.2 introduced Faces flows, which defines a scope that can span several pages. Flow scoped beans are created when the user enters a flow (a set of web pages), and are destroyed when the user leaves the flow.
Faces flows adopts the convention over configuration principle of JSF. The following conventions are typically used when developing applications employing faces flows:
- All pages in the flow must be placed in a directory whose name defines the name of the flow
- An XML configuration file named after the directory name, and suffixed with
-flow
, must exist inside the directory that contains the pages in the flow (the file may be empty, but it must exist) - The first page in the flow must be named after the directory name that contains the flow
- The last page in the flow must not be located inside the directory containing the flow and must be named after the directory name and suffixed with
-return
The following screenshot illustrates these conventions:
In the preceding example...