From 3aac995f210e8566f76c10bd8e61f13d10797128 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 31 Mar 2014 21:19:29 -0400 Subject: [PATCH] Update Spring Faces chapter with Java config --- src/reference/spring-faces.xml | 39 ++++++++++++++++++++++++++++++++-- src/reference/system-setup.xml | 1 + 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/reference/spring-faces.xml b/src/reference/spring-faces.xml index 4b5877f7..e1aa71bc 100644 --- a/src/reference/spring-faces.xml +++ b/src/reference/spring-faces.xml @@ -196,8 +196,9 @@ xsi:schemaLocation=" Configuring Web Flow for use with JSF - This section explains how to configure Web Flow with JSF. The - following is sample configuration for Web Flow and JSF: + This section explains how to configure Web Flow with JSF. + Both Java and XML style configuration are supported. + The following is sample configuration for Web Flow and JSF in XML: <?xml version="1.0" encoding="UTF-8"?> @@ -235,6 +236,34 @@ xsi:schemaLocation=" </beans> + + The following is an example of the same in Java configuration: + + + + + The main points are the installation of a FlowFacesContextLifecycleListener that manages a single FacesContext for the duration of Web Flow request and the use of the @@ -270,6 +299,12 @@ xsi:schemaLocation=" FlowHandlerAdapter normally used with Web Flow. This adapter initializes itself with a JsfAjaxHandler instead of the SpringJavaSciprtAjaxHandler. + + When using Java config, the AbstractFacesFlowConfiguration + base class automatically registers JsfResourceRequestHandler + so there is nothing further to do. + + diff --git a/src/reference/system-setup.xml b/src/reference/system-setup.xml index 6f6d0410..90ccac11 100644 --- a/src/reference/system-setup.xml +++ b/src/reference/system-setup.xml @@ -44,6 +44,7 @@