From 2ae69cbd7fe89f762abaab1c06f6f4543ecb241f Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 27 Jun 2012 14:11:20 -0700 Subject: [PATCH] Update ref docs for JSF and Portlet updates Issues: SWF-1553 --- src/reference/index.xml | 4 + src/reference/overview.xml | 2 +- src/reference/portlet.xml | 22 +- src/reference/spring-faces.xml | 596 +++++---------------------------- src/reference/spring-js.xml | 1 - src/reference/whatsnew.xml | 24 +- 6 files changed, 124 insertions(+), 525 deletions(-) diff --git a/src/reference/index.xml b/src/reference/index.xml index a66cd227..d51791c3 100644 --- a/src/reference/index.xml +++ b/src/reference/index.xml @@ -30,6 +30,10 @@ Rossen Stoyanchev + + Phillip + Webb + diff --git a/src/reference/overview.xml b/src/reference/overview.xml index af8a00f2..140241d4 100644 --- a/src/reference/overview.xml +++ b/src/reference/overview.xml @@ -18,7 +18,7 @@ Java 1.5 or higher - Spring 3.0 or higher + Spring 3.1 or higher diff --git a/src/reference/portlet.xml b/src/reference/portlet.xml index c1aa9932..fe746506 100644 --- a/src/reference/portlet.xml +++ b/src/reference/portlet.xml @@ -217,9 +217,10 @@ externalContext.requestMap.portletMode Review the swf-booking-portlet-faces sample in the Web Flow distribution - for a working JSF Portlets example with complete configuration details. The main thing - you'll need to notice in addition to what has already been described in this - chapter is the faces-config.xml configuration: + for a working JSF Portlets example with complete configuration details. The main + things to ensure are that the <faces:resources> elements is + included as part of your Spring configuration and that your + faces-config.xml configuration includes a PortletViewHandler: @@ -230,12 +231,23 @@ externalContext.requestMap.portletMode - org.springframework.faces.webflow.application.portlet.PortletFaceletViewHandler + org.springframework.faces.webflow.context.portlet.PortletViewHandler ]]> - + + The JSF Portlet support provided with Spring Web Flow requires JSF v2.0 or above. If + you are upgrading from a previous release you should ensure that your faces-config.xml + references org.springframework.faces.webflow.context.portlet.PortletViewHandler instead + of org.springframework.faces.webflow.application.portlet.PortletFaceletViewHandler. You + should also ensure that you have added <faces:resources> to you Spring configuration. + + + Although JSF v2.0 is a minimum requirement, this has been primarily driven to provide better support in + a Servlet environment. Many of the more advanced JSF 2.0 features (for example 'Partial State Saving') + are not supported by Spring Web Flow in a Portlet environment. + diff --git a/src/reference/spring-faces.xml b/src/reference/spring-faces.xml index 593a130e..388c25ae 100644 --- a/src/reference/spring-faces.xml +++ b/src/reference/spring-faces.xml @@ -11,29 +11,16 @@ Spring Web Flow provides a JSF integration that simplifies using JSF with Spring. It lets you use the JSF UI Component Model with Spring MVC and Spring Web Flow controllers. Along with the JSF integration Spring Web - Flow provides a small Facelets component library (called Spring Faces) for - use in JSF 1.2 environments and a Spring Security tag library for use in - both JSF 1.2 and JSF 2.0 environments (see for more details). + Flow provides a Spring Security tag library for use in JSF environments + (see for more details). + - Starting with version 2.2 the JSF integration in Web Flow supports - JSF 2.0 including Sun Mojarra and Apache MyFaces runtime environments. - Please, note however that JSF 2 partial state saving is not yet supported - with Apache MyFaces and needs to be disabled with the - javax.faces.PARTIAL_STATE_SAVING context parameter in - web.xml. - - Also note that the Spring Faces component library, which provides - Ajax and client-side validation capabilities is for JSF 1.2 environments - only and will not be upgraded to JSF 2.0. Applications are encouraged to - use 3rd party JSF 2 component libraries such as PrimeFaces and RichFaces. - The swf-booking-faces sample in the Spring Web Flow - distribution for example is built with JSF 2 and PrimeFaces - components. + Starting with Spring Web Flow version 2.4, JSF integration requires + JSF v2.0 or above. Both Sun Mojarra and Apache MyFaces runtime environments + are supported. Spring Web Flow also supports using JSF in a portlet environment. - Spring Web Flow's portlet integration supports Portlets API 2.0 and JSF - 1.2 only. Currently JSF 2 is not supported in combination with portlets. + Spring Web Flow's portlet integration supports Portlets API 2.0. See for more on Spring Web Flow's portlet integration. @@ -75,16 +62,7 @@ Model-level validation - - - Progressivy-enhancement sytle client-side validation - - - - Progressive-enhancement style Ajax requests with partial page - updates - - Using these features significantly reduce the amount of + Using these features significantly reduce the amount of configuration required in faces-config.xml. They provide a cleaner separation between the view and controller layers along with better modularization of application functionals. These features are detailed in @@ -94,6 +72,62 @@ linkend="defining-flows" />. + + Upgrading from Spring Web Flow 2.3 + + If you are upgrading from Spring Web Flow 2.3 or earlier you may need to + update several aspects of your project. JSF 2.0 is now a minimum requirement + and as result some components from previous releases are no longer included. + + + Spring Faces Components + Previous releases of Spring Web Flow shipped with a component library + which provided Ajax and client-side validation capabilities for JSF 1.2 + environments. Applications using these components will need to switch to a + 3rd party JSF component library such as PrimeFaces or RichFaces. + Components that have been removed include <sf:clientTextValidator>, + <sf:clientNumberValidator>, <sf:clientDateValidator>, + <sf:validateAllOnClick>, <sf:resource> and + <sf:resourceGroup>. + The swf-booking-faces sample in the Spring Web Flow distribution + shows an example built with PrimeFaces components. + + + + Configuring faces-config.xml + If your application defines a faces-config.xml file you should + ensure that the correct schema version is specified. In addition you should remove + any FaceletViewHandler references as Facelets are now the default rendering + technology for JSF 2.0 + + +<?xml version='1.0' encoding='UTF-8'?> +<faces-config xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" + version="2.0"> + +</faces-config> + + + + + Third-party Libraries + Previous releases of Spring Web Flow would often require additional configuration in order + for 3rd party component libraries to work correctly. JSF 2.0 introduced standard resource + loading mechanisms that removes the need for such custom configuration. As long as you + have a <faces:resources> element in your Spring configuration, libraries + such as RichFaces or Apache Trinidad you should work. + + + + Spring Security Facelets Tag Library + If you have a previously configured /WEB-INF/springsecurity.taglib.xml file + you may need to update the contents. See for + details. + + + Configuring web.xml @@ -153,86 +187,12 @@ </context-param> - - Configuring web.xml in JSF 1.2 - - When using the JSF 1.2 Spring Faces component library, you also - need to configure a servlet for serving CSS and JavaScript resources. - This servlet must be mapped to /resources/* in order for the URL's - rendered by the components to function correctly. - - -<!-- Serves static resource content from .jar files such as spring-faces.jar --> -<servlet> - <servlet-name>Resource Servlet</servlet-name> - <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class> - <load-on-startup>0</load-on-startup> -</servlet> - -<!-- Map all /resources requests to the Resource Servlet for handling --> -<servlet-mapping> - <servlet-name>Resource Servlet</servlet-name> - <url-pattern>/resources/*</url-pattern> -</servlet-mapping> - - - For optimal page-loading performance use the Spring Faces - components includeStyles and includeScripts. - These components will eagerly load the necessary CSS stylesheets and - JavaScript files at the position they are placed in your JSF view - template. In accordance with the recommendations of the Yahoo - Performance Guildlines, these two tags should be placed in the - head section of any page that uses the Spring Faces - components. For example: - - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<f:view xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:sf="http://www.springframework.org/tags/faces" - contentType="text/html" encoding="UTF-8"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>Hotel Booking Sample Application</title> - - <sf:includeStyles /> - <sf:includeScripts /> - - <ui:insert name="headIncludes"/> -</head> -... -</html> -</f:view> - - - This shows the opening of a typical Facelets XHTML layout template - that uses these components to force the loading of the needed CSS and - JavaScript resources at the ideal position. - - The includeStyles component includes the necessary - resources for the Dojo widget theme. By default, it includes the - resources for the "tundra" theme. An alternate theme may be selected by - setting the optional "theme" and "themePath" attributes on the - includeStyles component. For example: - - -<sf:includeStyles themePath="/styles/" theme="foobar"/> - - - - will try to load a CSS stylesheet at "/styles/foobar/foobar.css" - using the Spring JavaScript ResourceServlet. - Configuring Web Flow for use with JSF - This section explains how to configure Web Flow with JSF. The next - section provides more details specific to using Web Flow with JSF 2. The + This section explains how to configure Web Flow with JSF. The following is sample configuration for Web Flow and JSF: @@ -277,14 +237,7 @@ flow-builder-services element from the faces custom namespace to configure rendering for a JSF environment. - See the swf-booking-faces reference application in the distribution - for a complete working example. - - - - Configuring Spring MVC for JSF 2 - - In a JSF 2 environment you'll also need this Spring MVC related + In a JSF environment you'll also need this Spring MVC related configuration: @@ -307,46 +260,12 @@ </beans> - The resources custom namespace element delegates JSF 2 - resource requests to the JSF 2 resource API. The + The resources custom namespace element delegates JSF + resource requests to the JSF resource API. The JsfFlowHandlerAdapter is a replacement for the FlowHandlerAdapter normally used with Web Flow. This adapter initializes itself with a JsfAjaxHandler instead of the - SpringJavaSciprtAjaxHandler previously used with Spring Faces - components. - - - - Configuring faces-config.xml - - In JSF 1.2 you need to provide the below configuration in - faces-config.xml in order to use Facelets. If you are using - JSP and not using the Spring Faces components, you do not need to add - anything to your faces-config.xml - - -<faces-config> - <application> - <!-- Enables Facelets --> - <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> - </application> -</faces-config> - - - In JSF 2.0 your faces-config.xml should use the faces-config schema - version 2.0. Also you should remove the FaceletViewHandler shown above (if - it is present) as Facelets are now the default rendering technology in JSF - 2. - - -<?xml version='1.0' encoding='UTF-8'?> -<faces-config xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" - version="2.0"> - -</faces-config> - + SpringJavaSciprtAjaxHandler. @@ -363,15 +282,15 @@ In doing pure JSF development, you will quickly find that request scope is not long-lived enough for storing conversational model objects - that drive complex event-driven views. In JSF 1.2 the only available - option is to begin putting things into session scope, with the extra + that drive complex event-driven views. In JSF the usual option is to begin + putting things into session scope, with the extra burden of needing to clean the objects up before progressing to another view or functional area of the application. What is really needed is a - managed scope that is somewhere between request and session scope. JSF 2 + managed scope that is somewhere between request and session scope. JSF provides flash and view scopes that can be accessed programmatically via UIViewRoot.getViewMap(). Spring Web Flow provides access to flash, view, flow, and conversation scopes. These scopes are seamlessly integrated - through JSF variable resolvers and work the same in JSF 1.2 and in JSF 2.0 + through JSF variable resolvers and work the same in all JSF applications. @@ -675,9 +594,9 @@ - Handling Ajax Events In JSF 2.0 + Handling Ajax Events In JSF - JSF 2 provides built-in support for sending Ajax requests and + JSF provides built-in support for sending Ajax requests and performing partial processing and rendering on the server-side. You can specify a list of id's for partial rendering through the <f:ajax> facelets tag. @@ -699,85 +618,6 @@ </view-state> - - - Handling Ajax Events In JSF 1.2 - - For JSF 1.2 the Spring Faces UICommand components - have the ability to do Ajax-based partial view updates. These components - degrade gracefully so that the flow will still be fully functional by - falling back to full page refreshes if a user with a less capable - browser views the page. - - Revisiting the earlier example with the paged table, you can - change the "More Results" link to use an Ajax request by replacing the - standard commandButton with the Spring Faces component - version (note that the Spring Faces command components use Ajax by - default, but they can alternately be forced to use a normal form submit - by setting ajaxEnabled="false" on the component): - - -<sf:commandLink id="nextPageLink" value="More Results" action="next" /> - - - This event is handled just as in the non-Ajax case with the - transition element, but now you will add a special - render action that specifies which portions of the - component tree need to be re-rendered: - - -<view-state id="reviewHotels"> - <on-render> - <evaluate expression="bookingService.findHotels(searchCriteria)" - result="viewScope.hotels" result-type="dataModel" /> - </on-render> - <transition on="next"> - <evaluate expression="searchCriteria.nextPage()" /> - <render fragments="hotels:searchResultsFragment" /> - </transition> -</view-state> - - - The fragments="hotels:searchResultsFragment" is an - instruction that will be interpreted at render time, such that only the - component with the JSF clientId "hotels:searchResultsFragment" will be - rendered and returned to the client. This fragment will then be - automatically replaced in the page. The fragments attribute - can be a comma-delimited list of ids, with each id representing the root - node of a subtree (meaning the root node and all of its children) to be - rendered. If the "next" event is fired in a non-Ajax request (i.e., if - JavaScript is disabled on the client), the render action - will be ignored and the full page will be rendered as normal. - - In addition to the Spring Faces commandLink - component, there is a corresponding commandButton component - with the same functionality. There is also a special - ajaxEvent component that will raise a JSF action even in - response to any client-side DOM event. See the Spring Faces tag library - docs for full details. - - An additional built-in feature when using the Spring Faces - Ajax-enabled components is the ability to have the response rendered - inside a rich modal popup widget by setting popup="true" on - a view-state . - - -<view-state id="changeSearchCriteria" view="enterSearchCriteria.xhtml" popup="true"> - <on-entry> - <render fragments="hotelSearchFragment" /> - </on-entry> - <transition on="search" to="reviewHotels"> - <evaluate expression="searchCriteria.resetPage()"/> - </transition> -</view-state> - - - If the "changeSearchCriteria" view-state is reached - as the result of an Ajax-request, the result will be rendered into a - rich popup. If JavaScript is unavailable, the request will be processed - with a full browser refresh, and the "changeSearchCriteria" view will be - rendered as normal. - @@ -838,12 +678,12 @@ mvn package They would if the Web Flow didn't do a redirect. - This can lead to a problem specific to JSF 2 environments where a specific Sun Mojarra listener component caches the FacesContext assuming the same instance is available throughout the JSF lifecycle. + This can lead to a problem specific to JSF environments where a specific Sun Mojarra listener component caches the FacesContext assuming the same instance is available throughout the JSF lifecycle. In Web Flow however the render phase is temporarily put on hold and a client-side redirect executed. - The default behavior of Web Flow is desirable and it is unlikely JSF 2 applications will experience the issue. - This is because Ajax is often enabled the default in JSF 2 component libraries and Web Flow does not redirect during Ajax requests. + The default behavior of Web Flow is desirable and it is unlikely JSF applications will experience the issue. + This is because Ajax is often enabled the default in JSF component libraries and Web Flow does not redirect during Ajax requests. However if you experience this issue you can disable client-side redirects within the same view as follows: <webflow:flow-executor id="flowExecutor"> @@ -861,7 +701,7 @@ mvn package To use the library you'll need to create a .taglib.xml file and register it in web.xml. - For JSF 2 create the file + Create the file /WEB-INF/springsecurity.taglib.xml with the following content: @@ -897,43 +737,6 @@ mvn package <function-signature>boolean isAllowed(java.lang.String, java.lang.String)</function-signature> </function> </facelet-taglib> - - - For JSF 1.2 also create the file - /WEB-INF/springsecurity.taglib.xml but with the following - content instead: - - -<?xml version="1.0"?> -<!DOCTYPE facelet-taglib PUBLIC - "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd"> -<facelet-taglib> - <namespace>http://www.springframework.org/security/tags</namespace> - <tag> - <tag-name>authorize</tag-name> - <handler-class>org.springframework.faces.security.Jsf12FaceletsAuthorizeTagHandler</handler-class> - </tag> - <function> - <function-name>areAllGranted</function-name> - <function-class>org.springframework.faces.security.Jsf12FaceletsAuthorizeTagUtils</function-class> - <function-signature>boolean areAllGranted(java.lang.String)</function-signature> - </function> - <function> - <function-name>areAnyGranted</function-name> - <function-class>org.springframework.faces.security.Jsf12FaceletsAuthorizeTagUtils</function-class> - <function-signature>boolean areAnyGranted(java.lang.String)</function-signature> - </function> - <function> - <function-name>areNotGranted</function-name> - <function-class>org.springframework.faces.security.Jsf12FaceletsAuthorizeTagUtils</function-class> - <function-signature>boolean areNotGranted(java.lang.String)</function-signature> - </function> - <function> - <function-name>isAllowed</function-name> - <function-class>org.springframework.faces.security.Jsf12FaceletsAuthorizeTagUtils</function-class> - <function-signature>boolean isAllowed(java.lang.String, java.lang.String)</function-signature> - </function> -</facelet-taglib> Next, register the above file taglib in web.xml: @@ -993,93 +796,6 @@ mvn package - - Enhancing The User Experience With Rich Web Forms in JSF 1.2 - - JSF and Web Flow combine to provide an extensive server-side - validation model for your web application, but excessive roundtrips to the - server to execute this validation and return error messages can be a - tedious experience for your users. The Spring Faces component library - provides a number of client-side rich validation controls that can enhance - the user experience by applying simple validations that give immediate - feedback. Some simple examples are illustrated below. See the Spring Faces - taglib docs for a complete tag reference. - - - Validating a Text Field - - Simple client-side text validation can be applied with the - clientTextValidator component: - - -<sf:clientTextValidator required="true"> - <h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true"/> -</sf:clientTextValidator> - - - This will apply client-side required validation to the child - inputText component, giving the user a clear indicator if - the field is left blank. - - - - Validating a Numeric Field - - Simple client-side numeric validation can be applied with the - clientNumberValidator component: - - -<sf:clientTextValidator required="true" regExp="[0-9]{16}" - invalidMessage="A 16-digit credit card number is required."> - <h:inputText id="creditCard" value="#{booking.creditCard}" required="true"/> -</sf:clientTextValidator> - - - This will apply client-side validation to the child - inputText component, giving the user a clear indicator if - the field is left blank, is not numeric, or does not match the given - regular expression. - - - - Validating a Date Field - - Simple client-side date validation with a rich calendar popup can - be applied with the clientDateValidator component: - - -<sf:clientDateValidator required="true" > - <h:inputText id="checkinDate" value="#{booking.checkinDate}" required="true"> - <f:convertDateTime pattern="yyyy-MM-dd" timeZone="EST"/> - </h:inputText> -</sf:clientDateValidator> - - - This will apply client-side validation to the child - inputText component, giving the user a clear indicator if - the field is left blank or is not a valid date. - - - - Preventing an Invalid Form Submission - - The validateAllOnClick component can be used to - intercept the "onclick" event of a child component and suppress the - event if all client-side validations do not pass. - - -<sf:validateAllOnClick> - <sf:commandButton id="proceed" action="proceed" processIds="*" value="Proceed"/>&#160; -</sf:validateAllOnClick> - - - This will prevent the form from being submitted when the user - clicks the "proceed" button if the form is invalid. When the validations - are executed, the user is given clear and immediate indicators of the - problems that need to be corrected. - - - Third-Party Component Library Integration @@ -1091,158 +807,6 @@ mvn package Flow requests are not routed through the standard FacesServlet. Typically, anything that is traditionally mapped to the FacesServlet should be mapped to the Spring DispatcherServlet instead. (You can also map to both if for - example you are migrating a legacy JSF application page-by-page.) In some - cases, a deeper level of integration can be achieved by configuring - special flow services that are "aware" of a particular component library, - and these will be noted in the examples to follow. - - - Rich Faces Integration (JSF 1.2) - - To use the Rich Faces component library with Spring Web Flow, the - following filter configuration is needed in web.xml (in addition to the - other typical configuration already shown): - - -<filter> - <display-name>RichFaces Filter</display-name> - <filter-name>richfaces</filter-name> - <filter-class>org.ajax4jsf.Filter</filter-class> -</filter> - -<filter-mapping> - <filter-name>richfaces</filter-name> - <servlet-name>Spring Web MVC Dispatcher Servlet</servlet-name> - <dispatcher>REQUEST</dispatcher> - <dispatcher>FORWARD</dispatcher> - <dispatcher>INCLUDE</dispatcher> -</filter-mapping> - - - For deeper integration (including the ability to have a view with - combined use of the Spring Faces Ajax components and Rich Faces Ajax - components), configure the RichFacesAjaxHandler on your - FlowController: - - -<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController"> - <property name="flowExecutor" ref="flowExecutor" /> - <property name="ajaxHandler"> - <bean class="org.springframework.faces.richfaces.RichFacesAjaxHandler"/> - </property> -</bean> - - - RichFaces Ajax components can be used in conjunction with the - render tag to render partial fragments on an Ajax request. - Instead of embedding the ids of the components to be re-rendered - directly in the view template (as you traditionally do with Rich Faces), - you can bind the reRender attribute of a RichFaces Ajax - component to a special flowRenderFragments EL variable. For - example, in your view template you can have a fragment that you would - potentially like to re-render in response to a particular event: - - -<h:form id="hotels"> - <a4j:outputPanel id="searchResultsFragment"> - <h:outputText id="noHotelsText" value="No Hotels Found" rendered="#{hotels.rowCount == 0}"/> - <h:dataTable id="hotels" styleClass="summary" value="#{hotels}" var="hotel" rendered="#{hotels.rowCount > 0}"> - <h:column> - <f:facet name="header">Name</f:facet> - #{hotel.name} - </h:column> - <h:column> - <f:facet name="header">Address</f:facet> - #{hotel.address} - </h:column> - </h:dataTable> - </a4j:outputPanel> -</h:form> - - - then a RichFaces Ajax commandLink to fire the - event: - - -<a4j:commandLink id="nextPageLink" value="More Results" action="next" reRender="#{flowRenderFragments}" /> - - - and then in your flow definition a transition to - handle the event: - - -<transition on="next"> - <evaluate expression="searchCriteria.nextPage()" /> - <render fragments="hotels:searchResultsFragment" /> -</transition> - - - - - Apache MyFaces Trinidad Integration (JSF 1.2) - - The Apache MyFaces Trinidad library has been tested with the - Spring Web Flow's JSF integration and proven to fit in nicely. Deeper - integration to allow the Trinidad components and Spring Faces components - to play well together has not yet been attempted, but Trinidad provides - a pretty thorough solution on its own when used in conjunction with the - Spring Web Flow JSF integration. - - NOTE: An AjaxHandler implementation for Trinidad is - not currently provided out-of-the-box. In order to fully integrate with - Trinidad's PPR functionality, a custom implementation should be - provided. An community-provided partial example can be found here: - SWF-1160 - - Typical configuration when using Trinidad with Web Flow is as - follows in web.xml (in addition what has already been shown): - - -<context-param> - <param-name>javax.faces.STATE_SAVING_METHOD</param-name> - <param-value>server</param-value> -</context-param> - -<context-param> - <param-name> - org.apache.myfaces.trinidad.CHANGE_PERSISTENCE - </param-name> - <param-value>session</param-value> -</context-param> - -<context-param> - <param-name> - org.apache.myfaces.trinidad.ENABLE_QUIRKS_MODE - </param-name> - <param-value>false</param-value> -</context-param> - -<filter> - <filter-name>Trinidad Filter</filter-name> - <filter-class> - org.apache.myfaces.trinidad.webapp.TrinidadFilter - </filter-class> -</filter> - -<filter-mapping> - <filter-name>Trinidad Filter</filter-name> - <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> -</filter-mapping> - -<servlet> - <servlet-name>Trinidad Resource Servlet</servlet-name> - <servlet-class> - org.apache.myfaces.trinidad.webapp.ResourceServlet - </servlet-class> -</servlet> - -<servlet-mapping> - <servlet-name>resources</servlet-name> - <url-pattern>/adf/*</url-pattern> -</servlet-mapping> - - - + example you are migrating a legacy JSF application page-by-page.). diff --git a/src/reference/spring-js.xml b/src/reference/spring-js.xml index 8975c27f..9d9a0471 100644 --- a/src/reference/spring-js.xml +++ b/src/reference/spring-js.xml @@ -12,7 +12,6 @@ Use of the Spring JS API is demonstrated in the the Spring MVC + Web Flow version of the Spring Travel reference application. - In addition, the JSF components provided as part of the Spring Faces library build on Spring.js. diff --git a/src/reference/whatsnew.xml b/src/reference/whatsnew.xml index 04b70c03..e7dca07f 100644 --- a/src/reference/whatsnew.xml +++ b/src/reference/whatsnew.xml @@ -4,6 +4,26 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="whatsnew"> What's New + + Spring Web Flow 2.4 + + Minimum JSF 2.0 Requirement + + Java ServerFaces version 1.2 and earlier are no longer supported by Spring Web Flow, if you have not done so already you will need to upgrade to JSF 2.0 or above. + In addition the Spring Faces components that were previously provided with JSF 1.2 for progressive AJAX enhancements have been removed in this release. + See . + + + + Portlet API 2.0 and JSF 2.0 support + + The internal Portlet integration introduced in Spring Web Flow 2.2 has been upgraded for JSF 2.0 compatibility. + Some of the more advanced JSF 2.0 features, such as partial state saving, are not supported in a Portlet environment, however, existing application can now upgrade to the minimum required JSF version. + Upgraded projects will need to ensure that the <faces:resources> elements is + included as part of their Spring configuration. See . + + + Spring Web Flow 2.3 @@ -52,7 +72,7 @@ This is useful after form validation failure. Hitting Refresh or Back won't result in browser warnings. Hence this behavior is usually desirable. - However a new flow execution attribute makes it possible to disable it and that may also be necessary in some cases specific to JSF 2 applications. + However a new flow execution attribute makes it possible to disable it and that may also be necessary in some cases specific to JSF applications. See . @@ -189,7 +209,7 @@ mvn package - JFS Portlet Support + JSF Portlet Support Portlet API 2.0 and JSF 1.2 support