img
Folder Name
Purpose
Files for supporting i18n messages.
WEB-INF/i18n
This folder stores the layout template that will be used by Facelets.
WEB-INF/layouts
This folder stores the Spring MVC WebApplicationContext configurations. Both the
WEB-INF/spring
root-level and dispatcher servlet­level context configurations are stored here.
Spring Web Flow configuration will be stored in this folder too.
Spring Web Flow and JSF Configuration
This section discusses the necessary configurations required for a web application running on Spring
Web Flow, JSF 2, and PrimeFaces.
Adding Required Dependencies
For developing applications using Spring Web Flow and JSF 2 with PrimeFaces, the required
corresponding dependencies are shown in Table 18-3. Add them into your project.
Table 18-3. Maven Dependencies for Spring Web Flow, JSF 2, and PrimeFaces
Group ID
Artifact ID
Version
Description
2.3.0.
Spring Faces module within Spring Web Flow;
org.springframework.webflow spring-
faces
RELEASE supports integration with JSF 2.
2.0.7
JSF 2 API. Note that there is a compatibility issue
com.sun.faces
jsf-api
between JSF 2.1 with Spring Web Flow 2.3 at the
time of writing.
2.0.7
Oracle Sun's reference implementation of JSF 2.
com.sun.faces
jsf-impl
primefaces 3.0.1
PrimeFaces component library that supports
org.primefaces
JSF 2.
Configuring JSF
For a JSF application, we need to specify a JSF-dedicated configuration file (the faces-config.xml file
under the /WEB-INF folder). This file typically stores the general JSF configurations, information on the
managed beans (not required if you use the annotation style), and the navigation rules. However, we will
use Spring Web Flow, which integrates with Spring Framework's IoC for DI, so the configuration
required in this file is minimal. Listing 18-1 shows the content of the file (WEB-INF/faces-config.xml).
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home