From e5f17df95b47fee8a0ca3231740e727de07fa54b Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 29 Dec 2011 13:24:39 -0500 Subject: [PATCH 01/20] Increment version to 2.3.1.BUILD-SNAPSHOT. --- build-spring-webflow/resources/changelog.txt | 4 ++ build-spring-webflow/resources/readme.txt | 28 +++++----- build.properties | 2 +- pom.xml | 2 +- spring-binding/.classpath | 53 ++++++++++++------- spring-binding/.project | 28 +++++----- spring-binding/pom.xml | 2 +- spring-faces/pom.xml | 2 +- spring-js-resources/pom.xml | 2 +- spring-js/pom.xml | 2 +- spring-js/src/main/resources/.gitignore | 0 spring-webflow-reference/src/overview.xml | 14 ++--- .../src/spring-webflow-reference.xml | 2 +- .../booking-faces/.classpath | 10 ++-- .../org.eclipse.wst.common.component | 18 +++---- spring-webflow-samples/booking-faces/pom.xml | 2 +- spring-webflow-samples/booking-mvc/.classpath | 10 ++-- .../org.eclipse.wst.common.component | 22 +++----- spring-webflow-samples/booking-mvc/pom.xml | 2 +- .../booking-portlet-faces/.classpath | 12 ++--- .../org.eclipse.wst.common.component | 23 +++----- .../booking-portlet-faces/pom.xml | 2 +- .../booking-portlet-mvc/.classpath | 10 ++-- .../org.eclipse.wst.common.component | 22 +++----- .../booking-portlet-mvc/pom.xml | 2 +- .../org.eclipse.wst.common.component | 7 +-- spring-webflow-samples/jsf-booking/pom.xml | 2 +- spring-webflow-samples/pom.xml | 2 +- spring-webflow/pom.xml | 2 +- 29 files changed, 130 insertions(+), 159 deletions(-) create mode 100644 spring-js/src/main/resources/.gitignore diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 67e2c502..f27d0ded 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -2,6 +2,10 @@ SPRING WEB FLOW CHANGELOG ========================= http://www.springframework.org/webflow +Changes in version 2.3.1.RELEASE +----------------------------------------------- + + Changes in version 2.3.0.RELEASE (Feb 28, 2011) ----------------------------------------------- [SWF-360] - Flow managed persistence context propagation diff --git a/build-spring-webflow/resources/readme.txt b/build-spring-webflow/resources/readme.txt index 69bedf7e..242863eb 100644 --- a/build-spring-webflow/resources/readme.txt +++ b/build-spring-webflow/resources/readme.txt @@ -1,4 +1,4 @@ -SPRING WEB FLOW 2.3.0 +SPRING WEB FLOW 2.3.1 ---------------------- http://www.springframework.org/webflow @@ -50,25 +50,25 @@ The following jar files are included in the distribution. The contents of each jar and its dependencies are noted. Dependencies in [brackets] are optional, and are just necessary for certain functionality. -* org.springframework.webflow-2.3.0.RELEASE.jar +* org.springframework.webflow-2.3.1.RELEASE.jar - Contents: The Spring Web Flow system - Dependencies: Commons Logging, spring-core, spring-beans, spring-context, spring-expression, spring-binding, spring-web, spring-web-servlet, spring-js [Log4J, Xerces, XML APIs, OGNL, EL API, JPA API, Hibernate, Spring Security, Servlet API, Portlet API, JUnit] -* org.springframework.binding-2.3.0.RELEASE.jar +* org.springframework.binding-2.3.1.RELEASE.jar - Contents: The Spring Data Binding framework, a utility library used by Web Flow - Dependencies: Commons Logging, spring-beans, spring-core, spring-context, spring-expression [Log4J, OGNL, EL API] -* org.springframework.js-2.3.0.RELEASE.jar +* org.springframework.js-2.3.1.RELEASE.jar - Contents: The Spring JavaScript module - Dependencies: spring-beans, spring-core, spring-context, spring-web, spring-web-servlet -* org.springframework.js.resources-2.3.0.RELEASE.jar +* org.springframework.js.resources-2.3.1.RELEASE.jar - Contents: Spring's custom Dojo build and client-side Dojo integration files. - Dependencies: -* org.springframework.faces-2.3.0.RELEASE.jar +* org.springframework.faces-2.3.1.RELEASE.jar - Contents: The Spring Faces module, containing Spring's integration with Java Server Faces (JSF) and additional JSF functionality. - Dependencies: spring-webflow, spring-js, spring-js-resources, JSF API @@ -109,19 +109,19 @@ org.springframework.js, and org.springframework.js via transitive dependencies): org.springframework.webflow org.springframework.binding - 2.3.0.RELEASE + 2.3.1.RELEASE org.springframework.webflow org.springframework.js - 2.3.0.RELEASE + 2.3.1.RELEASE org.springframework.webflow org.springframework.webflow - 2.3.0.RELEASE + 2.3.1.RELEASE If using JavaServerFaces all you need to include is: @@ -129,7 +129,7 @@ If using JavaServerFaces all you need to include is: org.springframework.webflow org.springframework.faces - 2.3.0.RELEASE + 2.3.1.RELEASE To access jars using Ivy, add the following repositories to your Ivy config: @@ -146,13 +146,13 @@ To access jars using Ivy, add the following repositories to your Ivy config: Then declare the following dependencies in your ivy.xml: - - - + + + If using JavaServerFaces: - + Refer to the reference documentation for more coverage on obtaining Web Flow jars using Maven or Ivy. diff --git a/build.properties b/build.properties index 1bc2bd83..491a1169 100644 --- a/build.properties +++ b/build.properties @@ -1,4 +1,4 @@ -version=2.3.0 +version=2.3.1 release.type=integration natural.name=spring-webflow project.key=SWF diff --git a/pom.xml b/pom.xml index f55958f6..efa48a66 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ spring-webflow-root pom Spring Web Flow - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT spring-binding spring-js-resources diff --git a/spring-binding/.classpath b/spring-binding/.classpath index 950a9819..586caa4c 100644 --- a/spring-binding/.classpath +++ b/spring-binding/.classpath @@ -1,21 +1,34 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-binding/.project b/spring-binding/.project index d0cc361b..bef675d6 100644 --- a/spring-binding/.project +++ b/spring-binding/.project @@ -1,17 +1,13 @@ - - spring-binding - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + spring-binding + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + + + + org.eclipse.jdt.core.javabuilder + + + + org.eclipse.jdt.core.javanature + + \ No newline at end of file diff --git a/spring-binding/pom.xml b/spring-binding/pom.xml index cca0ab16..fd164f6c 100644 --- a/spring-binding/pom.xml +++ b/spring-binding/pom.xml @@ -5,7 +5,7 @@ spring-binding jar Spring Binding - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT commons-logging diff --git a/spring-faces/pom.xml b/spring-faces/pom.xml index 95a7ec4a..8fb0322a 100644 --- a/spring-faces/pom.xml +++ b/spring-faces/pom.xml @@ -5,7 +5,7 @@ spring-faces jar Spring Faces - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT commons-logging diff --git a/spring-js-resources/pom.xml b/spring-js-resources/pom.xml index 9f60f661..cdb6e714 100644 --- a/spring-js-resources/pom.xml +++ b/spring-js-resources/pom.xml @@ -5,7 +5,7 @@ spring-js-resources jar Spring JavaScript Resources - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT diff --git a/spring-js/pom.xml b/spring-js/pom.xml index 26fcbacb..c5fe5d78 100644 --- a/spring-js/pom.xml +++ b/spring-js/pom.xml @@ -5,7 +5,7 @@ spring-js jar Spring JavaScript - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT commons-logging diff --git a/spring-js/src/main/resources/.gitignore b/spring-js/src/main/resources/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/spring-webflow-reference/src/overview.xml b/spring-webflow-reference/src/overview.xml index 7912ec9b..c7c994c3 100644 --- a/spring-webflow-reference/src/overview.xml +++ b/spring-webflow-reference/src/overview.xml @@ -58,7 +58,7 @@ org.springframework.webflow spring-webflow - 2.3.0.RELEASE + 2.3.1.RELEASE ]]> @@ -69,7 +69,7 @@ org.springframework.webflow spring-faces - 2.3.0.RELEASE + 2.3.1.RELEASE ]]> @@ -106,7 +106,7 @@ org.springframework.webflow org.springframework.webflow - 2.3.0.RELEASE + 2.3.1.RELEASE ]]> @@ -116,7 +116,7 @@ org.springframework.webflow org.springframework.faces - 2.3.0.RELEASE + 2.3.1.RELEASE ]]> @@ -150,14 +150,14 @@ runtime" />]]> + rev="2.3.1.RELEASE" conf="compile->runtime" />]]> And if using JavaServerFaces: runtime" />]]> + rev="2.3.1.RELEASE" conf="compile->runtime" />]]> @@ -182,7 +182,7 @@ org.springframework.webflow org.springframework.webflow-library libd - 2.3.0.RELEASE + 2.3.1.RELEASE ]]> diff --git a/spring-webflow-reference/src/spring-webflow-reference.xml b/spring-webflow-reference/src/spring-webflow-reference.xml index f538cf21..91b45a3f 100644 --- a/spring-webflow-reference/src/spring-webflow-reference.xml +++ b/spring-webflow-reference/src/spring-webflow-reference.xml @@ -6,7 +6,7 @@ Spring Web Flow Reference Guide Spring Web Flow Spring Web Flow - Version 2.3.0 + Version 2.3.1 diff --git a/spring-webflow-samples/booking-faces/.classpath b/spring-webflow-samples/booking-faces/.classpath index 50ce8018..5bc22de3 100755 --- a/spring-webflow-samples/booking-faces/.classpath +++ b/spring-webflow-samples/booking-faces/.classpath @@ -72,15 +72,15 @@ - + - + - - + + @@ -88,7 +88,7 @@ - + diff --git a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component index 8223f501..e5cd1403 100755 --- a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component @@ -1,5 +1,4 @@ - - + @@ -97,7 +96,7 @@ uses - + uses @@ -112,16 +111,16 @@ uses - + uses uses - + uses - + uses @@ -142,7 +141,7 @@ uses - + uses @@ -159,8 +158,5 @@ - - - - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml index 3bf68092..9f8725d6 100644 --- a/spring-webflow-samples/booking-faces/pom.xml +++ b/spring-webflow-samples/booking-faces/pom.xml @@ -6,7 +6,7 @@ booking-faces war Hotel Booking : Spring MVC + Web Flow + JSF/PrimeFaces - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT 3.0.5.RELEASE 3.0.2.RELEASE diff --git a/spring-webflow-samples/booking-mvc/.classpath b/spring-webflow-samples/booking-mvc/.classpath index 5d7401e6..25fa2769 100755 --- a/spring-webflow-samples/booking-mvc/.classpath +++ b/spring-webflow-samples/booking-mvc/.classpath @@ -86,14 +86,14 @@ - + - - + + @@ -103,10 +103,8 @@ - + - - diff --git a/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component index 1bfbb1d0..c42990b6 100755 --- a/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component @@ -1,5 +1,4 @@ - - + @@ -100,7 +99,7 @@ uses - + uses @@ -118,10 +117,10 @@ uses - + uses - + uses @@ -148,21 +147,15 @@ uses - + uses uses - - uses - uses - - uses - uses @@ -183,8 +176,5 @@ - - - - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-mvc/pom.xml b/spring-webflow-samples/booking-mvc/pom.xml index 98df10cc..98daf2d2 100644 --- a/spring-webflow-samples/booking-mvc/pom.xml +++ b/spring-webflow-samples/booking-mvc/pom.xml @@ -6,7 +6,7 @@ booking-mvc war Hotel Booking : Spring MVC + Web Flow + JSP - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT 3.0.5.RELEASE 3.0.2.RELEASE diff --git a/spring-webflow-samples/booking-portlet-faces/.classpath b/spring-webflow-samples/booking-portlet-faces/.classpath index fe66f7c2..8156d631 100644 --- a/spring-webflow-samples/booking-portlet-faces/.classpath +++ b/spring-webflow-samples/booking-portlet-faces/.classpath @@ -83,24 +83,22 @@ - + - + - - + + - + - - \ No newline at end of file diff --git a/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component index 2fd06f3a..2c89b1d1 100644 --- a/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component @@ -1,5 +1,4 @@ - - + @@ -103,7 +102,7 @@ uses - + uses @@ -118,16 +117,16 @@ uses - + uses uses - + uses - + uses @@ -139,7 +138,7 @@ uses - + uses @@ -148,15 +147,9 @@ uses - - uses - uses - - uses - uses @@ -165,7 +158,5 @@ - - - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-portlet-faces/pom.xml b/spring-webflow-samples/booking-portlet-faces/pom.xml index 6631bbc3..950df72e 100644 --- a/spring-webflow-samples/booking-portlet-faces/pom.xml +++ b/spring-webflow-samples/booking-portlet-faces/pom.xml @@ -6,7 +6,7 @@ booking-portlet-faces war Hotel Booking : Spring Portlet MVC + Web Flow + JSF - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT 3.0.5.RELEASE 1.5.10 diff --git a/spring-webflow-samples/booking-portlet-mvc/.classpath b/spring-webflow-samples/booking-portlet-mvc/.classpath index 38c7e01d..583c72c7 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.classpath +++ b/spring-webflow-samples/booking-portlet-mvc/.classpath @@ -74,23 +74,21 @@ - + - - + + - + - - \ No newline at end of file diff --git a/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component index 6d9b89e2..805f7ea3 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component @@ -1,5 +1,4 @@ - - + @@ -88,7 +87,7 @@ uses - + uses @@ -106,10 +105,10 @@ uses - + uses - + uses @@ -121,7 +120,7 @@ uses - + uses @@ -130,15 +129,9 @@ uses - - uses - uses - - uses - uses @@ -147,8 +140,5 @@ - - - - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-portlet-mvc/pom.xml b/spring-webflow-samples/booking-portlet-mvc/pom.xml index acd4c5d6..e1215cfd 100644 --- a/spring-webflow-samples/booking-portlet-mvc/pom.xml +++ b/spring-webflow-samples/booking-portlet-mvc/pom.xml @@ -6,7 +6,7 @@ booking-portlet-mvc war Hotel Booking : Spring Portlet MVC + Web Flow + JSP - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT 3.0.5.RELEASE 1.5.10 diff --git a/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component index c9b76ff8..0da81cfa 100644 --- a/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component @@ -1,5 +1,4 @@ - - + @@ -99,7 +98,5 @@ - - - + \ No newline at end of file diff --git a/spring-webflow-samples/jsf-booking/pom.xml b/spring-webflow-samples/jsf-booking/pom.xml index 547bee1e..1f944a97 100644 --- a/spring-webflow-samples/jsf-booking/pom.xml +++ b/spring-webflow-samples/jsf-booking/pom.xml @@ -6,7 +6,7 @@ jsf-booking war Hotel Booking : Spring Framework + JSF - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT 3.0.5.RELEASE 1.5.10 diff --git a/spring-webflow-samples/pom.xml b/spring-webflow-samples/pom.xml index 4445aad6..adf3a3ff 100644 --- a/spring-webflow-samples/pom.xml +++ b/spring-webflow-samples/pom.xml @@ -6,7 +6,7 @@ spring-webflow-samples pom Spring Web Flow Samples - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT booking-mvc booking-faces diff --git a/spring-webflow/pom.xml b/spring-webflow/pom.xml index 34c064a4..61221a52 100644 --- a/spring-webflow/pom.xml +++ b/spring-webflow/pom.xml @@ -5,7 +5,7 @@ spring-webflow jar Spring Web Flow - 2.3.0.BUILD-SNAPSHOT + 2.3.1.BUILD-SNAPSHOT commons-logging From dae30d0436241e8d72983d0e05cfa9bb0108f696 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 6 Jan 2012 16:30:54 -0500 Subject: [PATCH 02/20] Update README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..c710262c --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# Overview + +Spring Web Flow facilitates building web applications that require guided navigation -- e.g. a shopping cart, flight check-in, a loan application, and many others. In contrast to stateless, free-form navigation such use cases have a clear start and end point, one or more screens to go through in a specific order, and a set of changes that are not finalized to the end. + +A distinguishing feature is the ability to define a **flow definition** consisting of *states*, *transitions*, and *data*. For example, view states correspond to the individual screens of the flow while transitions are caused by events resulting from the click of a button or a link. Data may be stored in scopes such as *flash*, *view*, *flow*, and others. Scoped data is cleared when it is no longer in scope. + +In REST terms a flow represents as a single resource. The same URL used to start the flow is also the URL used to step through the flow (there is also an execution key uniquely identifying the current flow instance). As a result of this approach navigation remains encapsulated in the flow definition. + +Some key benefits of using Spring Web Flow: + ++ A flow abstraction to model *"long conversations"* in web applications ++ Proper encapsulation for navigation rules ++ Multiple scopes in which to keep data ++ Automatic use of the POST/REDIRECT/GET pattern to avoid browser warnings ++ Impossible to return to completed flow sessions via browser back button ++ Rapid prototyping of flow requirements ++ Development mode in which flow definition changes are detected on the fly ++ IDE visualization for flow definitions ++ Much more... + +# Documentation + +See the current [Javadoc](http://static.springsource.org/spring-webflow/docs/current/javadoc-api/) and [Reference](http://static.springsource.org/spring-webflow/docs/current/spring-webflow-reference/) docs. + +# Samples + +The `spring-webflow-samples` sub-directory contains several samples that can be built with Maven. More samples can be found in the [spring-samples](https://src.springframework.org/svn/spring-samples) SVN repository: see [webflow-showcase](https://src.springframework.org/svn/spring-samples/webflow-showcase) and [webflow-primefaces-showcase](https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase). + +# Downloading artifacts + +Instructions on [downloading Spring Web Flow](https://github.com/SpringSource/spring-webflow/wiki/Downloading-Spring-Web-Flow-Artifacts) artifacts via Maven and other build systems are available via the project wiki. + +# Issue Tracking + +Spring Web Flow's JIRA issue tracker can be found [here](http://jira.springsource.org/browse/SWF). If you think you've found a bug, please consider helping to reproduce it by submitting an issue reproduction project via the [spring-webflow-issues](https://github.com/springsource/spring-webflow-issues) repository. The [readme](https://github.com/springsource/spring-webflow-issues#readme) provides simple step-by-step instructions. + +# Getting support + +Check out the [Spring forums](http://forum.springsource.org/forumdisplay.php?36-Web-Flow) and the [spring-webflow tag](http://stackoverflow.com/questions/tagged/spring-webflow) on StackOverflow. [Commercial support](http://springsource.com/support/springsupport) is available too. + +# Building from source + +Instructions on [building Spring Web Flow](https://github.com/SpringSource/spring-webflow/wiki/Building-From-Source) from source are available via the project wiki. + +# Contributing + +[Pull requests](http://help.github.com/send-pull-requests) are welcome. You'll be asked to sign our contributor license agreement ([CLA](https://support.springsource.com/spring_committer_signup)). Trivial changes like typo fixes are especially appreciated (just [fork and edit](https://github.com/blog/844-forking-with-the-edit-button)!). For larger changes, please search through JIRA for similiar issues, creating a new one if necessary, and discuss your ideas with the Spring Web Flow team. + +# License + +Spring Web Flow is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0). + + + From d960e852503b6805dc4a3691b46cb34823cb5c84 Mon Sep 17 00:00:00 2001 From: Phil Webb Date: Tue, 17 Jan 2012 16:12:21 -0800 Subject: [PATCH 03/20] Update primefaces repository --- spring-webflow-samples/booking-faces/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml index 9f8725d6..70a0d89f 100644 --- a/spring-webflow-samples/booking-faces/pom.xml +++ b/spring-webflow-samples/booking-faces/pom.xml @@ -217,7 +217,7 @@ primefaces Prime Technology Maven Repository - http://repository.prime.com.tr + http://repository.primefaces.org default From 962b123d73308c912e0ad65a0d3bd75d961412ef Mon Sep 17 00:00:00 2001 From: Phil Webb Date: Tue, 17 Jan 2012 17:00:41 -0800 Subject: [PATCH 04/20] Ensure required test directory is created in GIT and remove javadoc refs to missing home dir --- spring-binding/.classpath | 18 +++--------------- spring-faces/src/test/resources/.gitignore | 0 2 files changed, 3 insertions(+), 15 deletions(-) create mode 100644 spring-faces/src/test/resources/.gitignore diff --git a/spring-binding/.classpath b/spring-binding/.classpath index 586caa4c..6e8d7986 100644 --- a/spring-binding/.classpath +++ b/spring-binding/.classpath @@ -5,22 +5,10 @@ - - - - - - - - - - + + - - - - - + diff --git a/spring-faces/src/test/resources/.gitignore b/spring-faces/src/test/resources/.gitignore new file mode 100644 index 00000000..e69de29b From f7641202797e7fc7043b0d6d1cd9035adf632891 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 27 Feb 2012 17:06:33 -0500 Subject: [PATCH 05/20] Upgrade JSF Mojarra to version 2.1.7 --- spring-faces/.classpath | 4 ++-- spring-faces/ivy.xml | 9 +++++++-- spring-faces/pom.xml | 4 ++-- .../faces/webflow/Jsf2FlowFacesContext.java | 19 +++++++++++++++++++ .../booking-faces/.classpath | 4 ++-- .../org.eclipse.wst.common.component | 4 ++-- spring-webflow-samples/booking-faces/pom.xml | 2 +- 7 files changed, 35 insertions(+), 11 deletions(-) diff --git a/spring-faces/.classpath b/spring-faces/.classpath index ddaee984..8107e410 100644 --- a/spring-faces/.classpath +++ b/spring-faces/.classpath @@ -8,8 +8,8 @@ - - + + diff --git a/spring-faces/ivy.xml b/spring-faces/ivy.xml index dcc4454c..71d26378 100644 --- a/spring-faces/ivy.xml +++ b/spring-faces/ivy.xml @@ -11,6 +11,7 @@ + @@ -44,9 +45,13 @@ + + + + - - + + diff --git a/spring-faces/pom.xml b/spring-faces/pom.xml index 8fb0322a..4fc05e30 100644 --- a/spring-faces/pom.xml +++ b/spring-faces/pom.xml @@ -108,13 +108,13 @@ com.sun.faces jsf-api - 2.0.3 + 2.1.7 provided com.sun.faces jsf-impl - 2.0.3 + 2.1.7 provided diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java index eb456971..4e644c43 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java @@ -127,6 +127,12 @@ public class Jsf2FlowFacesContext extends FlowFacesContext { getDelegate().validationFailed(); } + // --------------- JSF 2.1 Pass-through delegate methods ------------------// + + public boolean isReleased() { + return getDelegate().isReleased(); + } + protected class Jsf2FlowExternalContext extends FlowExternalContext { Log logger = LogFactory.getLog(FlowExternalContext.class); @@ -242,5 +248,18 @@ public class Jsf2FlowFacesContext extends FlowFacesContext { return delegate.encodePartialActionURL(url); } + // --------------- JSF 2.1 Pass-through delegate methods ------------------// + + public int getSessionMaxInactiveInterval() { + return delegate.getSessionMaxInactiveInterval(); + } + + public boolean isSecure() { + return delegate.isSecure(); + } + + public void setSessionMaxInactiveInterval(int interval) { + delegate.setSessionMaxInactiveInterval(interval); + } } } diff --git a/spring-webflow-samples/booking-faces/.classpath b/spring-webflow-samples/booking-faces/.classpath index 5bc22de3..4a22c3c6 100755 --- a/spring-webflow-samples/booking-faces/.classpath +++ b/spring-webflow-samples/booking-faces/.classpath @@ -62,8 +62,8 @@ - - + + diff --git a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component index e5cd1403..820e3a2e 100755 --- a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component @@ -66,10 +66,10 @@ uses - + uses - + uses diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml index 70a0d89f..8e89d7b8 100644 --- a/spring-webflow-samples/booking-faces/pom.xml +++ b/spring-webflow-samples/booking-faces/pom.xml @@ -11,7 +11,7 @@ 3.0.5.RELEASE 3.0.2.RELEASE 1.5.10 - 2.0.3 + 2.1.7 2.2.1 From 85d8d73c1d3675b1d2406ce855ff9437187ca577 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 28 Feb 2012 10:47:47 -0500 Subject: [PATCH 06/20] Update Jsf2FlowFacesContext.isValidationFailed() Previously isValidationFailed() merely delegated to the wrapped FacesContext ignoring any errors that may have been added to Web Flow's MessageContext. After the change isValidationFailed() checks and returns true if the MessageContext contains errors or otherwise it delegates. Issues: SWF-1490 --- build-spring-webflow/resources/changelog.txt | 2 ++ .../FlowFacesContextMessageDelegate.java | 7 +++++++ .../faces/webflow/Jsf2FlowFacesContext.java | 6 +++++- .../faces/webflow/FlowFacesContextTests.java | 17 ++++++++++++++--- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index f27d0ded..34c34041 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -4,6 +4,8 @@ http://www.springframework.org/webflow Changes in version 2.3.1.RELEASE ----------------------------------------------- +Upgrade JSF Mojarra version to 2.1.7 +Improve Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors Changes in version 2.3.0.RELEASE (Feb 28, 2011) diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowFacesContextMessageDelegate.java b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowFacesContextMessageDelegate.java index 04a34f6a..5c90b05d 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowFacesContextMessageDelegate.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowFacesContextMessageDelegate.java @@ -61,6 +61,13 @@ public class FlowFacesContextMessageDelegate { this.context = context; } + /** + * Whether Web Flow's MessageContext contains any errors. + */ + public boolean hasErrorMessages() { + return context.getMessageContext().hasErrorMessages(); + } + /** * @see FlowFacesContext#addMessage(String, FacesMessage) */ diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java index 4e644c43..eee23d44 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowFacesContext.java @@ -112,7 +112,11 @@ public class Jsf2FlowFacesContext extends FlowFacesContext { } public boolean isValidationFailed() { - return getDelegate().isValidationFailed(); + if (getMessageDelegate().hasErrorMessages()) { + return true; + } else { + return getDelegate().isValidationFailed(); + } } public void setExceptionHandler(ExceptionHandler exceptionHandler) { diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowFacesContextTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowFacesContextTests.java index ba4ced67..ea15bf0d 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowFacesContextTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowFacesContextTests.java @@ -27,15 +27,17 @@ public class FlowFacesContextTests extends TestCase { FacesContext facesContext; - RequestContext requestContext = (RequestContext) EasyMock.createMock(RequestContext.class); + RequestContext requestContext; MessageContext messageContext; MessageContext prepopulatedMessageContext; + @SuppressWarnings("cast") protected void setUp() throws Exception { jsf.setUp(); - facesContext = new FlowFacesContext(requestContext, jsf.facesContext()); + requestContext = (RequestContext) EasyMock.createMock(RequestContext.class); + facesContext = new Jsf2FlowFacesContext(requestContext, jsf.facesContext()); setupMessageContext(); } @@ -60,7 +62,6 @@ public class FlowFacesContextTests extends TestCase { assertEquals("foo", summaryMessage.getText()); Message detailMessage = messageContext.getMessagesBySource("foo_detail")[0]; assertEquals("bar", detailMessage.getText()); - } public final void testGetGlobalMessagesOnly() { @@ -262,6 +263,16 @@ public class FlowFacesContextTests extends TestCase { assertSame(facesContext, facesContext.getELContext().getContext(FacesContext.class)); } + public final void testValidationFailed() { + messageContext = new DefaultMessageContext(); + EasyMock.expect(requestContext.getMessageContext()).andStubReturn(messageContext); + EasyMock.replay(new Object[] { requestContext }); + + facesContext.addMessage("foo", new FacesMessage(FacesMessage.SEVERITY_ERROR, "foo", "bar")); + + assertEquals(true, facesContext.isValidationFailed()); + } + private void setupMessageContext() { prepopulatedMessageContext = new DefaultMessageContext(); prepopulatedMessageContext.addMessage(new MessageBuilder().source("null_summary").defaultText("foo").info() From df649084abfc5bd4cac4c18e614ec8e7f99bb404 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 28 Feb 2012 13:22:13 -0500 Subject: [PATCH 07/20] Fix for bean validation messages in BindingResult Previously Web Flow's BindingResult implementation distinguished object from field-level errors by checking if the source of the error is null or otherwise a String. However, class-level bean validation errors have a field source represented by an empty String. After this change object and field-level errors are recognized by checking for String-based field source that is neither null nor empty. This commit also contains a fix for spring-faces tests where in JSF 2.1 the presence of an unreleased FacesContext may cause some tests to fail. --- build-spring-webflow/resources/changelog.txt | 4 ++-- .../springframework/binding/message/Message.java | 16 +++++++++++++++- .../faces/webflow/JSFMockHelper.java | 8 ++++++-- .../webflow/mvc/view/BindingModel.java | 8 ++++---- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 34c34041..ed7ee50a 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -5,8 +5,8 @@ http://www.springframework.org/webflow Changes in version 2.3.1.RELEASE ----------------------------------------------- Upgrade JSF Mojarra version to 2.1.7 -Improve Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors - +Modify Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors +Recognize class-level bean validation messages in BindingResult.getGlobalErrors() Changes in version 2.3.0.RELEASE (Feb 28, 2011) ----------------------------------------------- diff --git a/spring-binding/src/main/java/org/springframework/binding/message/Message.java b/spring-binding/src/main/java/org/springframework/binding/message/Message.java index bc3909c5..4b7ba94a 100644 --- a/spring-binding/src/main/java/org/springframework/binding/message/Message.java +++ b/spring-binding/src/main/java/org/springframework/binding/message/Message.java @@ -18,6 +18,7 @@ package org.springframework.binding.message; import java.io.Serializable; import org.springframework.core.style.ToStringCreator; +import org.springframework.util.StringUtils; /** * An object of communication that provides text information. For example, a validation message may inform a web @@ -49,7 +50,8 @@ public class Message implements Serializable { /** * A reference to the source element this message is associated with. This could be a field on a form in UI, or null - * if the message is not associated with a any particular element. + * (or empty "" in the case of global bean validation) if the message is not associated with a any particular + * element. * @return the source */ public Object getSource() { @@ -72,6 +74,18 @@ public class Message implements Serializable { return severity; } + /** + * Whether the message is associated with a field. + * @return {@code true} if the source is a String that has text; {@code false} otherwise. + */ + public boolean hasField() { + if (this.source instanceof String) { + return StringUtils.hasText((String) this.source); + } else { + return false; + } + } + public String toString() { return new ToStringCreator(this).append("source", source).append("severity", severity).append("text", text) .toString(); diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java b/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java index c73b6d0b..8e9423ce 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java @@ -113,6 +113,11 @@ public class JSFMockHelper { public void setUp() throws Exception { + // Ensure no pre-existing FacesContext .. + if (FacesContext.getCurrentInstance() != null) { + FacesContext.getCurrentInstance().release(); + } + // Set up a new thread context class loader threadContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader( @@ -132,8 +137,7 @@ public class JSFMockHelper { FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY, MockBaseFacesContextFactory.class.getName()); FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY, MockLifecycleFactory.class.getName()); FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY, MockRenderKitFactory.class.getName()); - FactoryFinder.setFactory(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, MockPartialViewContextFactory.class - .getName()); + FactoryFinder.setFactory(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, MockPartialViewContextFactory.class.getName()); lifecycleFactory = (MockLifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); lifecycle = (MockLifecycle) lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); facesContextFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY); diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java index 24f32991..4e8e62ff 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java @@ -111,7 +111,7 @@ public class BindingModel extends AbstractErrors implements BindingResult { } public List getGlobalErrors() { - return toErrors(messageContext.getMessagesByCriteria(ERRORS_NULL_SOURCE)); + return toErrors(messageContext.getMessagesByCriteria(ERRORS_WITHOUT_FIELD_SOURCE)); } public List getFieldErrors(String field) { @@ -318,15 +318,15 @@ public class BindingModel extends AbstractErrors implements BindingResult { } }; - private static final MessageCriteria ERRORS_NULL_SOURCE = new MessageCriteria() { + private static final MessageCriteria ERRORS_WITHOUT_FIELD_SOURCE = new MessageCriteria() { public boolean test(Message message) { - return message.getSource() == null && message.getSeverity() == Severity.ERROR; + return (!message.hasField() && message.getSeverity() == Severity.ERROR); } }; private static final MessageCriteria ERRORS_FIELD_SOURCE = new MessageCriteria() { public boolean test(Message message) { - return message.getSeverity() == Severity.ERROR && message.getSource() instanceof String; + return (message.hasField() && message.getSeverity() == Severity.ERROR); } }; From d616e6bed88e765ed70e4f30207487e436b12e4b Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 28 Feb 2012 17:59:57 -0500 Subject: [PATCH 08/20] Fix "embedded" mode to be flow session local. The "embedded" mode flag, which is used to suppress redirects so that a flow can be embedded on a surrounding page, was previously stored as a flow execution attribute. The idea was that a flow can be launched in embedded mode simply by passing a flow input rather than having that decision fixed through a static flow definition. However flow execution attributes are not a suitable place to store the embedded mode flag since they are globally shared. Instead this information is now stored a flow session attribute, which means that each individual session (including subflows) can have be in embedded mode or not without affecting others --- build-spring-webflow/resources/changelog.txt | 1 + .../engine/impl/FlowExecutionImpl.java | 8 +++---- .../engine/impl/FlowExecutionImplFactory.java | 2 +- .../webflow/engine/impl/FlowSessionImpl.java | 22 +++++++++++++++---- .../impl/RequestControlContextImpl.java | 3 +-- .../webflow/execution/FlowSession.java | 12 +++++++--- .../webflow/test/MockFlowSession.java | 22 +++++++++++++++---- .../test/MockRequestControlContext.java | 11 +++------- .../webflow/engine/ViewStateTests.java | 4 ++-- .../impl/FlowExecutionImplFactoryTests.java | 5 +++-- 10 files changed, 60 insertions(+), 30 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index ed7ee50a..195ae8f1 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -7,6 +7,7 @@ Changes in version 2.3.1.RELEASE Upgrade JSF Mojarra version to 2.1.7 Modify Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors Recognize class-level bean validation messages in BindingResult.getGlobalErrors() +Fix "embedded" mode to be flow session local, i.e. specific to a specific flow or subflow. Changes in version 2.3.0.RELEASE (Feb 28, 2011) ----------------------------------------------- diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImpl.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImpl.java index 524a4185..161a1def 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImpl.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImpl.java @@ -214,9 +214,6 @@ public class FlowExecutionImpl implements FlowExecution, Externalizable { if (logger.isDebugEnabled()) { logger.debug("Starting in " + externalContext + " with input " + input); } - if (hasEmbeddedModeAttribute(input)) { - attributes.asMap().put("embeddedMode", Boolean.TRUE); - } MessageContext messageContext = createMessageContext(null); RequestControlContext requestContext = createRequestContext(externalContext, messageContext); RequestContextHolder.setRequestContext(requestContext); @@ -353,13 +350,16 @@ public class FlowExecutionImpl implements FlowExecution, Externalizable { void start(Flow flow, MutableAttributeMap input, RequestControlContext context) { listeners.fireSessionCreating(context, flow); - FlowSession session = activateSession(flow); + FlowSessionImpl session = activateSession(flow); if (session.isRoot()) { status = FlowExecutionStatus.ACTIVE; } if (input == null) { input = new LocalAttributeMap(); } + if (hasEmbeddedModeAttribute(input)) { + session.setEmbeddedMode(); + } StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext(); messageContext.setMessageSource(flow.getApplicationContext()); listeners.fireSessionStarting(context, session, input); diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactory.java index acc704c6..478388d7 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactory.java @@ -78,7 +78,7 @@ public class FlowExecutionImplFactory implements FlowExecutionFactory { logger.debug("Creating new execution of '" + flowDefinition.getId() + "'"); } FlowExecutionImpl execution = new FlowExecutionImpl((Flow) flowDefinition); - execution.setAttributes(new LocalAttributeMap(executionAttributes.asMap())); + execution.setAttributes(executionAttributes); execution.setListeners(executionListenerLoader.getListeners(execution.getDefinition())); execution.setKeyFactory(executionKeyFactory); return execution; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowSessionImpl.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowSessionImpl.java index c30fd1e0..85e70122 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowSessionImpl.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/FlowSessionImpl.java @@ -32,8 +32,8 @@ import org.springframework.webflow.execution.FlowSession; /** * Implementation of the FlowSession interfaced used internally by the FlowExecutionImpl. This class is - * closely coupled with FlowExecutionImpl and RequestControlContextImpl. The three - * classes work together to form a complete flow execution implementation. + * closely coupled with FlowExecutionImpl and RequestControlContextImpl. The three classes + * work together to form a complete flow execution implementation. * * @author Keith Donald * @author Erwin Vervaet @@ -42,6 +42,8 @@ class FlowSessionImpl implements FlowSession, Externalizable { private static final String VIEW_SCOPE_ATTRIBUTE = "viewScope"; + private static final String EMBEDDED_MODE_ATTRIBUTE = "embeddedMode"; + /** * The flow definition (a singleton). *

@@ -119,6 +121,10 @@ class FlowSessionImpl implements FlowSession, Externalizable { return (MutableAttributeMap) scope.get(VIEW_SCOPE_ATTRIBUTE); } + public boolean isEmbeddedMode() { + return (Boolean) scope.get(EMBEDDED_MODE_ATTRIBUTE, Boolean.FALSE); + } + public FlowSession getParent() { return parent; } @@ -224,6 +230,14 @@ class FlowSessionImpl implements FlowSession, Externalizable { this.stateId = stateId; } + /** + * Set a flow session attribute to indicate the current session should execute in embedded mode. + * @see FlowSession#isEmbeddedMode() + */ + void setEmbeddedMode() { + this.scope.put(EMBEDDED_MODE_ATTRIBUTE, true); + } + // internal helpers /** @@ -242,8 +256,8 @@ class FlowSessionImpl implements FlowSession, Externalizable { public String toString() { if (flow != null) { - return new ToStringCreator(this).append("flow", getFlowId()).append("state", getStateId()).append("scope", - scope).toString(); + return new ToStringCreator(this).append("flow", getFlowId()).append("state", getStateId()) + .append("scope", scope).toString(); } else { return "[Unhydrated session '" + flowId + "' in state '" + stateId + "']"; } diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java index 17f93595..5b4a515d 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/impl/RequestControlContextImpl.java @@ -255,8 +255,7 @@ class RequestControlContextImpl implements RequestControlContext { } public boolean getEmbeddedMode() { - Boolean embedded = flowExecution.getAttributes().getBoolean("embeddedMode"); - return (embedded != null) ? embedded.booleanValue() : false; + return flowExecution.getActiveSession().isEmbeddedMode(); } public String toString() { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/execution/FlowSession.java b/spring-webflow/src/main/java/org/springframework/webflow/execution/FlowSession.java index 2ef8d3ef..021a6c2a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/execution/FlowSession.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/execution/FlowSession.java @@ -23,9 +23,9 @@ import org.springframework.webflow.definition.StateDefinition; * A single, local instantiation of a {@link FlowDefinition flow definition} launched within an overall flow execution. *

* This object maintains all instance state including session status within exactly one governing FlowExecution, as well - * as the current flow state. This object also acts as the local "flow scope" data model. Data in - * {@link #getScope() flow scope} lives for the life of this object and is cleaned up automatically when this object is - * destroyed. Destruction happens when this session enters an end state. + * as the current flow state. This object also acts as the local "flow scope" data model. Data in {@link #getScope() + * flow scope} lives for the life of this object and is cleaned up automatically when this object is destroyed. + * Destruction happens when this session enters an end state. *

* Note that a flow session is in no way linked to an HTTP session. It just uses the familiar "session" naming * convention to denote a stateful object. @@ -62,6 +62,12 @@ public interface FlowSession { */ public MutableAttributeMap getViewScope() throws IllegalStateException; + /** + * Returns true if the flow session was started in embedded page mode. An embedded flow can make different + * assumptions with regards to whether redirect after post is necessary. + */ + public boolean isEmbeddedMode(); + /** * Returns the parent flow session in the current flow execution, or null if there is no parent flow * session. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/test/MockFlowSession.java b/spring-webflow/src/main/java/org/springframework/webflow/test/MockFlowSession.java index 7fd3ee9b..1b76134e 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/test/MockFlowSession.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/test/MockFlowSession.java @@ -36,7 +36,9 @@ import org.springframework.webflow.execution.FlowSession; */ public class MockFlowSession implements FlowSession { - private static final String FLOW_VIEW_MAP_ATTRIBUTE = "flowViewMap"; + private static final String VIEW_MAP_ATTRIBUTE = "flowViewMap"; + + private static final String EMBEDDED_MODE_ATTRIBUTE = "embeddedMode"; private Flow definition; @@ -99,7 +101,11 @@ public class MockFlowSession implements FlowSession { throw new IllegalStateException("The current state '" + state.getId() + "' of this flow '" + definition.getId() + "' is not a view state - view scope not accessible"); } - return (MutableAttributeMap) scope.get(FLOW_VIEW_MAP_ATTRIBUTE); + return (MutableAttributeMap) scope.get(VIEW_MAP_ATTRIBUTE); + } + + public boolean isEmbeddedMode() { + return (Boolean) scope.get(EMBEDDED_MODE_ATTRIBUTE, Boolean.FALSE); } public FlowSession getParent() { @@ -163,13 +169,21 @@ public class MockFlowSession implements FlowSession { return state; } + /** + * Set a flow session attribute to indicate the current session should execute in embedded mode. + * @see FlowSession#isEmbeddedMode() + */ + void setEmbeddedMode() { + this.scope.put(EMBEDDED_MODE_ATTRIBUTE, true); + } + // internal helpers private void initViewScope() { - scope.put(FLOW_VIEW_MAP_ATTRIBUTE, new LocalAttributeMap()); + scope.put(VIEW_MAP_ATTRIBUTE, new LocalAttributeMap()); } private void destroyViewScope() { - scope.remove(FLOW_VIEW_MAP_ATTRIBUTE); + scope.remove(VIEW_MAP_ATTRIBUTE); } } \ No newline at end of file diff --git a/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestControlContext.java b/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestControlContext.java index ec0b959b..f65a0eb6 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestControlContext.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/test/MockRequestControlContext.java @@ -138,11 +138,7 @@ public class MockRequestControlContext extends MockRequestContext implements Req } public boolean getEmbeddedMode() { - Boolean embedded = getMockFlowExecutionContext().getAttributes().getBoolean("embeddedMode"); - if (embedded != null) { - return embedded; - } - return false; + return getMockFlowExecutionContext().getMockActiveSession().isEmbeddedMode(); } // implementation specific accessors for testing @@ -157,8 +153,7 @@ public class MockRequestControlContext extends MockRequestContext implements Req .put("redirectInSameState", Boolean.valueOf(redirectInSameState)); } - public void setEmbeddedMode(boolean embedded) { - getMockFlowExecutionContext().getAttributeMap().put("embeddedMode", Boolean.valueOf(embedded)); + public void setEmbeddedMode() { + getMockFlowExecutionContext().getMockActiveSession().setEmbeddedMode(); } - } \ No newline at end of file diff --git a/spring-webflow/src/test/java/org/springframework/webflow/engine/ViewStateTests.java b/spring-webflow/src/test/java/org/springframework/webflow/engine/ViewStateTests.java index 8e937b7c..23bcf30b 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/engine/ViewStateTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/engine/ViewStateTests.java @@ -451,7 +451,7 @@ public class ViewStateTests extends TestCase { state.getTransitionSet().add(t); MockRequestControlContext context = new MockRequestControlContext(flow); context.getMockExternalContext().setAjaxRequest(true); - context.setEmbeddedMode(true); + context.setEmbeddedMode(); context.setAlwaysRedirectOnPause(true); context.setRedirectInSameState(true); state.enter(context); @@ -468,7 +468,7 @@ public class ViewStateTests extends TestCase { MockRequestControlContext context = new MockRequestControlContext(flow); state.enter(context); context.getMockExternalContext().setAjaxRequest(true); - context.setEmbeddedMode(true); + context.setEmbeddedMode(); context.setAlwaysRedirectOnPause(true); context.setRedirectInSameState(true); assertFalse(context.getMockExternalContext().getFlowExecutionRedirectRequested()); diff --git a/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactoryTests.java b/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactoryTests.java index 88a4d711..23a5adc1 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactoryTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/FlowExecutionImplFactoryTests.java @@ -85,7 +85,7 @@ public class FlowExecutionImplFactoryTests extends TestCase { factory.setExecutionAttributes(attributes); FlowExecution execution = factory.createFlowExecution(flowDefinition); assertEquals(attributes, execution.getAttributes()); - assertNotSame(attributes, execution.getAttributes()); + assertSame("Flow execution attributes are global", attributes.asMap(), execution.getAttributes().asMap()); } public void testCreateWithExecutionListener() { @@ -142,7 +142,8 @@ public class FlowExecutionImplFactoryTests extends TestCase { flowExecution.getFlowSessions().add(session1); flowExecution.getFlowSessions().add(session2); factory.restoreFlowExecution(flowExecution, flowDefinition, flowExecutionKey, conversationScope, locator); - assertSame(executionAttributes, flowExecution.getAttributes()); + assertSame("Flow execution attributes are global", flowExecution.getAttributes().asMap(), + executionAttributes.asMap()); assertEquals(1, flowExecution.getListeners().length); assertSame(listener, flowExecution.getListeners()[0]); assertSame(flowExecutionKey, flowExecution.getKey()); From 3a36fedb5b88cf93bbd01917d0396e1ce09186d9 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 28 Feb 2012 18:25:18 -0500 Subject: [PATCH 09/20] Make AbstractMvcView.shouldValidate() protected Issues: SWF-1458 --- .../org/springframework/webflow/mvc/view/AbstractMvcView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/AbstractMvcView.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/AbstractMvcView.java index 6307466b..ae80603a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/AbstractMvcView.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/AbstractMvcView.java @@ -521,7 +521,7 @@ public abstract class AbstractMvcView implements View { * @param transition the matched transition * @return true if binding should occur, false if not */ - private boolean shouldValidate(Object model, TransitionDefinition transition) { + protected boolean shouldValidate(Object model, TransitionDefinition transition) { Boolean validateAttribute = getValidateAttribute(transition); if (validateAttribute != null) { return validateAttribute.booleanValue(); From 3430771c30ea5cb36f28aa7d3f9c8384856a9a77 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 28 Feb 2012 18:59:32 -0500 Subject: [PATCH 10/20] Minor fixes - Add versions to schema references in samples - Documentation fix - Remove unused package import --- .../src/flow-definition-field-mappings.xml | 16 ++++++++++++++++ .../webapp/WEB-INF/config/data-access-config.xml | 6 ++---- .../webapp/WEB-INF/config/security-config.xml | 6 ++---- .../WEB-INF/config/web-application-config.xml | 6 ++---- .../webapp/WEB-INF/config/webflow-config.xml | 6 +++--- .../main/webapp/WEB-INF/config/webmvc-config.xml | 4 ++-- .../WEB-INF/flows/booking/booking-flow.xml | 4 +++- .../webapp/WEB-INF/config/data-access-config.xml | 6 ++---- .../webapp/WEB-INF/config/security-config.xml | 6 ++---- .../WEB-INF/config/web-application-config.xml | 6 ++---- .../webapp/WEB-INF/config/webflow-config.xml | 6 ++---- .../main/webapp/WEB-INF/config/webmvc-config.xml | 3 ++- .../WEB-INF/hotels/booking/booking-flow.xml | 4 +++- .../engine/FlowExecutionExceptionHandler.java | 3 +-- 14 files changed, 44 insertions(+), 38 deletions(-) diff --git a/spring-webflow-reference/src/flow-definition-field-mappings.xml b/spring-webflow-reference/src/flow-definition-field-mappings.xml index e4083f33..3f907947 100644 --- a/spring-webflow-reference/src/flow-definition-field-mappings.xml +++ b/spring-webflow-reference/src/flow-definition-field-mappings.xml @@ -944,6 +944,22 @@ bind + + + * + + + validate + + + + + * + + + history + + diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml index 34de9412..581e73bd 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/tx - http://www.springframework.org/schema/tx/spring-tx.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml index 22095f5a..ef58ed92 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml index 02cfdcde..942c9c19 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml index cf2c27d2..73b3f04a 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml @@ -4,9 +4,9 @@ xmlns:webflow="http://www.springframework.org/schema/webflow-config" xmlns:faces="http://www.springframework.org/schema/faces" xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd - http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd + http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml index 4d1ec049..571e501d 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:faces="http://www.springframework.org/schema/faces" xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/booking-flow.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/booking-flow.xml index 16508198..5deff5b6 100755 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/booking-flow.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/booking-flow.xml @@ -1,7 +1,9 @@ + xsi:schemaLocation=" + http://www.springframework.org/schema/webflow + http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml index fd08d966..94e2bae0 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/tx - http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml index a7a11517..9a5df657 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-3.0.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/web-application-config.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/web-application-config.xml index 3792545c..5791b170 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/web-application-config.xml +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/web-application-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context-2.5.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml index a8b343c8..7dcaeed3 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml @@ -3,10 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config" xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/webflow-config - http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd"> diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml index e9cf7f66..56e56fd4 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml @@ -2,7 +2,8 @@ diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml index 782efffb..ff62d702 100644 --- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml +++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml @@ -1,7 +1,9 @@ + xsi:schemaLocation=" + http://www.springframework.org/schema/webflow + http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/FlowExecutionExceptionHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/FlowExecutionExceptionHandler.java index 36e2493d..a9add62e 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/FlowExecutionExceptionHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/FlowExecutionExceptionHandler.java @@ -15,7 +15,6 @@ */ package org.springframework.webflow.engine; -import org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler; import org.springframework.webflow.execution.FlowExecutionException; /** @@ -32,7 +31,7 @@ import org.springframework.webflow.execution.FlowExecutionException; * * Note: Because flow execution handlers are more difficult to implement correctly, consider catching exceptions in your * web flow action code and returning result events that drive standard transitions. Alternatively, consider use of the - * existing {@link TransitionExecutingFlowExecutionExceptionHandler} which illustrates the proper way to implement an + * existing {@code TransitionExecutingFlowExecutionExceptionHandler} which illustrates the proper way to implement an * exception handler. * * @author Keith Donald From 63151acb8d4387c8bc79e0b7cdfa58ba15ad25dd Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 29 Feb 2012 12:21:07 -0500 Subject: [PATCH 11/20] Minor fix in FlowPartialViewContext The fix ensures that getRenderIds returns a mutable collection as stated in the contract for the method in PartialViewContext. Issues: SWF-1480 --- .../faces/webflow/FlowPartialViewContext.java | 5 +++-- .../webflow/FlowPartialViewContextTests.java | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowPartialViewContext.java b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowPartialViewContext.java index ba7f7f2a..bc0ff70e 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowPartialViewContext.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowPartialViewContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2004-2011 the original author or authors. + * Copyright 2004-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ package org.springframework.faces.webflow; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -55,7 +56,7 @@ public class FlowPartialViewContext extends PartialViewContextWrapper { RequestContext requestContext = RequestContextHolder.getRequestContext(); String[] fragmentIds = (String[]) requestContext.getFlashScope().get(View.RENDER_FRAGMENTS_ATTRIBUTE); if (fragmentIds != null && fragmentIds.length > 0) { - return Arrays.asList(fragmentIds); + return new ArrayList(Arrays.asList(fragmentIds)); } } return getWrapped().getRenderIds(); diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowPartialViewContextTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowPartialViewContextTests.java index a31185ff..e8102221 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowPartialViewContextTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowPartialViewContextTests.java @@ -16,6 +16,7 @@ import org.springframework.webflow.test.MockRequestContext; public class FlowPartialViewContextTests extends TestCase { + @SuppressWarnings("unchecked") public void testReturnFragmentIds() throws Exception { String[] fragmentIds = new String[] { "foo", "bar" }; @@ -46,4 +47,18 @@ public class FlowPartialViewContextTests extends TestCase { assertEquals(renderIds, context.getRenderIds()); } + @SuppressWarnings("unchecked") + public void testReturnFragmentIdsMutable() throws Exception { + String[] fragmentIds = new String[] { "foo", "bar" }; + + RequestContext requestContext = new MockRequestContext(); + requestContext.getFlashScope().asMap().put(View.RENDER_FRAGMENTS_ATTRIBUTE, fragmentIds); + RequestContextHolder.setRequestContext(requestContext); + + Collection renderIds = new FlowPartialViewContext(null).getRenderIds(); + renderIds.add("baz"); + + assertEquals(Arrays.asList("foo", "bar", "baz"), renderIds); + } + } \ No newline at end of file From 8e1aa91b40a75b95af8c7cdc9c225c134d677cb0 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 29 Feb 2012 15:36:14 -0500 Subject: [PATCH 12/20] JSF view root to survive redirect in same state For JSF 2.0.x Spring Web Flow the view root could not be preserved across redirects in the same state (e.g. following validation) because a JSF state saving listener held on to the FacesContext, which Web Flow releases before the redirect. This issue was addressed in JSF 2.1 http://java.net/jira/browse/JAVASERVERFACES-1604 which means we can allow the view root to survive the redirect. Note that the behavior can also be controlled with the redirect-in-same state flow execution attribute. Issues: SWF-1502 --- build-spring-webflow/resources/changelog.txt | 1 + .../org/springframework/faces/webflow/JsfView.java | 14 ++------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 195ae8f1..cc46401b 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -8,6 +8,7 @@ Upgrade JSF Mojarra version to 2.1.7 Modify Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors Recognize class-level bean validation messages in BindingResult.getGlobalErrors() Fix "embedded" mode to be flow session local, i.e. specific to a specific flow or subflow. +Allow JSF view root to survive redirect in same state (following fix in JSF Mojarra 2.1) Changes in version 2.3.0.RELEASE (Feb 28, 2011) ----------------------------------------------- diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java index d270b2c0..4ff32a98 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java @@ -16,7 +16,6 @@ package org.springframework.faces.webflow; import static org.springframework.faces.webflow.JsfRuntimeInformation.isAtLeastJsf12; -import static org.springframework.faces.webflow.JsfRuntimeInformation.isLessThanJsf20; import java.io.IOException; import java.io.Serializable; @@ -137,17 +136,8 @@ public class JsfView implements View { } public Serializable getUserEventState() { - if (isLessThanJsf20()) { - // Set the temporary UIViewRoot state so that it will be available across the redirect - return new ViewRootHolder(getViewRoot()); - } else { - // In JSF 2 the partial state saving algorithm attaches a system event listener to the UIViewRoot which - // holds on to a reference to the FacesContext instance. The FacesContext instance is released at end of - // each request. Hence, keeping the UIViewRoot across the redirect is not feasible. - // @see com.sun.faces.context.StateContext$AddRemoveListener - logger.debug("User event state requested but not saved."); - return null; - } + // Set the temporary UIViewRoot state so that it will be available across the redirect + return new ViewRootHolder(getViewRoot()); } public boolean hasFlowEvent() { From 27cd5cca31162b420128b44d0b74ae51a5aeb49f Mon Sep 17 00:00:00 2001 From: Phil Webb Date: Sat, 3 Mar 2012 12:05:13 -0800 Subject: [PATCH 13/20] Add support for PostRestoreStateEvent A PostRestoreStateEvent should be delivered whenever a JSF view is restored. Typically we rely on JSF to generate required events but in this case since WebFlow handles the RESTORE_VIEW phase itself, we need to deliver this event ourselves. Issues: SWF-1500 --- build-spring-webflow/resources/changelog.txt | 1 + .../faces/webflow/Jsf2FlowApplication.java | 17 +++ .../faces/webflow/JsfUtils.java | 17 +++ .../faces/webflow/JsfViewFactory.java | 4 + .../PostRestoreStateEventVisitCallback.java | 28 +++++ .../faces/webflow/JSFMockHelper.java | 7 +- .../faces/webflow/JsfViewFactoryTests.java | 101 ++++++++++++++++-- .../faces/webflow/MockBaseFacesContext.java | 4 + 8 files changed, 168 insertions(+), 11 deletions(-) create mode 100644 spring-faces/src/main/java/org/springframework/faces/webflow/PostRestoreStateEventVisitCallback.java diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index cc46401b..5e41e688 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -9,6 +9,7 @@ Modify Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageCont Recognize class-level bean validation messages in BindingResult.getGlobalErrors() Fix "embedded" mode to be flow session local, i.e. specific to a specific flow or subflow. Allow JSF view root to survive redirect in same state (following fix in JSF Mojarra 2.1) +Ensure PostRestoreStateEvent is delivered to registered listeners. Changes in version 2.3.0.RELEASE (Feb 28, 2011) ----------------------------------------------- diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java index 0fd91129..12f5048c 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java @@ -26,7 +26,11 @@ import javax.faces.application.Resource; import javax.faces.application.ResourceHandler; import javax.faces.component.UIComponent; import javax.faces.component.behavior.Behavior; +import javax.faces.component.visit.VisitContext; import javax.faces.context.FacesContext; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.ExceptionQueuedEvent; +import javax.faces.event.ExceptionQueuedEventContext; import javax.faces.event.SystemEvent; import javax.faces.event.SystemEventListener; @@ -116,4 +120,17 @@ public class Jsf2FlowApplication extends FlowApplication { getDelegate().unsubscribeFromEvent(systemEventClass, listener); } + // Ideally this method should be in JsfView + // We keep it here to avoid ClassNotFoundExceptions for JSF 1.2 apps + + static void publishPostRestoreStateEvent() { + FacesContext facesContext = FlowFacesContext.getCurrentInstance(); + try { + facesContext.getViewRoot().visitTree(VisitContext.createVisitContext(facesContext), + new PostRestoreStateEventVisitCallback()); + } catch (AbortProcessingException e) { + facesContext.getApplication().publishEvent(facesContext, ExceptionQueuedEvent.class, + new ExceptionQueuedEventContext(facesContext, e, null, facesContext.getCurrentPhaseId())); + } + } } diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfUtils.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfUtils.java index 94bff65e..14a87676 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfUtils.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfUtils.java @@ -15,12 +15,15 @@ */ package org.springframework.faces.webflow; +import java.lang.reflect.Method; + import javax.faces.context.FacesContext; import javax.faces.event.PhaseEvent; import javax.faces.event.PhaseId; import javax.faces.event.PhaseListener; import javax.faces.lifecycle.Lifecycle; +import org.springframework.util.ReflectionUtils; import org.springframework.webflow.execution.RequestContextHolder; /** @@ -66,4 +69,18 @@ public class JsfUtils { } } + // This method is here for JSF 1.2 backwards compatibility + + static void publishPostRestoreStateEvent() { + try { + Class clazz = Class.forName("org.springframework.faces.webflow.Jsf2FlowApplication"); + Method method = ReflectionUtils.findMethod(clazz, "publishPostRestoreStateEvent"); + ReflectionUtils.makeAccessible(method); + ReflectionUtils.invokeMethod(method, null); + + } catch (ClassNotFoundException ex) { + throw new IllegalStateException("Expected Jsf2FlowApplication: " + ex); + } + } + } diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java index a5186356..5cfa83c9 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java @@ -128,6 +128,9 @@ public class JsfViewFactory implements ViewFactory { view = createJsfView(viewRoot, lifecycle, context); } } + if (isAtLeastJsf20()) { + JsfUtils.publishPostRestoreStateEvent(); + } if (!facesContext.getRenderResponse()) { JsfUtils.notifyAfterListeners(PhaseId.RESTORE_VIEW, lifecycle, facesContext); } @@ -182,4 +185,5 @@ public class JsfViewFactory implements ViewFactory { processTree(context, child); } } + } diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/PostRestoreStateEventVisitCallback.java b/spring-faces/src/main/java/org/springframework/faces/webflow/PostRestoreStateEventVisitCallback.java new file mode 100644 index 00000000..8d4009ee --- /dev/null +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/PostRestoreStateEventVisitCallback.java @@ -0,0 +1,28 @@ +package org.springframework.faces.webflow; + +import javax.faces.component.UIComponent; +import javax.faces.component.visit.VisitCallback; +import javax.faces.component.visit.VisitContext; +import javax.faces.component.visit.VisitResult; +import javax.faces.event.PostRestoreStateEvent; + +/** + * A VisitCallback used to deliver a PostRestoreStataEvent similar to + * {@code RestoreViewPhase.deliverPostRestoreStateEvent(..)} in Sun's JSF. + * + * @since 2.3.1 + */ +class PostRestoreStateEventVisitCallback implements VisitCallback { + + private PostRestoreStateEvent event; + + public VisitResult visit(VisitContext context, UIComponent target) { + if (this.event == null) { + this.event = new PostRestoreStateEvent(target); + } else { + this.event.setComponent(target); + } + target.processEvent(event); + return VisitResult.ACCEPT; + } +} diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java b/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java index 8e9423ce..e80a1741 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/JSFMockHelper.java @@ -28,13 +28,14 @@ import org.apache.myfaces.test.mock.MockServletConfig; import org.apache.myfaces.test.mock.MockServletContext; import org.apache.myfaces.test.mock.lifecycle.MockLifecycle; import org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory; +import org.apache.myfaces.test.mock.visit.MockVisitContextFactory; /** * Helper for using the mock JSF environment provided by shale-test inside unit tests that do not extend * {@link AbstractJsfTestCase} * * @author Jeremy Grelle - * @author Phil Webb + * @author Phillip Webb */ public class JSFMockHelper { @@ -137,7 +138,9 @@ public class JSFMockHelper { FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY, MockBaseFacesContextFactory.class.getName()); FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY, MockLifecycleFactory.class.getName()); FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY, MockRenderKitFactory.class.getName()); - FactoryFinder.setFactory(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, MockPartialViewContextFactory.class.getName()); + FactoryFinder.setFactory(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, + MockPartialViewContextFactory.class.getName()); + FactoryFinder.setFactory(FactoryFinder.VISIT_CONTEXT_FACTORY, MockVisitContextFactory.class.getName()); lifecycleFactory = (MockLifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); lifecycle = (MockLifecycle) lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); facesContextFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY); diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java index fb3c9b4e..1e8a4c36 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java @@ -11,13 +11,20 @@ import javax.faces.component.UIOutput; import javax.faces.component.UIPanel; import javax.faces.component.UIViewRoot; import javax.faces.context.FacesContext; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.ComponentSystemEvent; +import javax.faces.event.ExceptionQueuedEvent; +import javax.faces.event.ExceptionQueuedEventContext; import javax.faces.event.PhaseEvent; import javax.faces.event.PhaseId; import javax.faces.event.PhaseListener; +import javax.faces.event.PostRestoreStateEvent; +import javax.faces.event.SystemEvent; import javax.faces.lifecycle.Lifecycle; import junit.framework.TestCase; +import org.apache.myfaces.test.mock.MockApplication20; import org.easymock.EasyMock; import org.jboss.el.ExpressionFactoryImpl; import org.springframework.binding.expression.ExpressionParser; @@ -82,6 +89,8 @@ public class JsfViewFactoryTests extends TestCase { private void configureJsf() throws Exception { jsfMock.setUp(); + ExceptionEventAwareMockApplication application = new ExceptionEventAwareMockApplication(); + ((MockBaseFacesContext) FlowFacesContext.getCurrentInstance()).setApplication(application); trackingListener = new TrackingPhaseListener(); jsfMock.lifecycle().addPhaseListener(trackingListener); jsfMock.facesContext().setViewRoot(null); @@ -98,7 +107,7 @@ public class JsfViewFactoryTests extends TestCase { new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), lifecycle); - UIViewRoot newRoot = new UIViewRoot(); + MockUIViewRoot newRoot = new MockUIViewRoot(); newRoot.setViewId(VIEW_ID); ((MockViewHandler) viewHandler).setCreateView(newRoot); context.inViewState(); @@ -115,7 +124,7 @@ public class JsfViewFactoryTests extends TestCase { } /** - * View already exists in view/flash scope and must be restored and the lifecycle executed, no event signaled + * View already exists in view/flash scope and must be restored and the lifecycle executed, no flow event signaled */ public final void testGetView_Restore() { @@ -124,7 +133,7 @@ public class JsfViewFactoryTests extends TestCase { new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), lifecycle); - UIViewRoot existingRoot = new UIViewRoot(); + MockUIViewRoot existingRoot = new MockUIViewRoot(); existingRoot.setViewId(VIEW_ID); UIInput input = new UIInput(); input.setId("invalidInput"); @@ -144,10 +153,11 @@ public class JsfViewFactoryTests extends TestCase { assertEquals("View name did not match", VIEW_ID, ((JsfView) restoredView).getViewRoot().getViewId()); assertFalse("An unexpected event was signaled,", restoredView.hasFlowEvent()); assertTrue("The input component's valid flag was not reset", input.isValid()); + assertTrue("The PostRestoreViewEvent was not seen", existingRoot.isPostRestoreStateEventSeen()); } /** - * View already exists in view/flash scope and must be restored and the lifecycle executed, no event signaled + * View already exists in view/flash scope and must be restored and the lifecycle executed, no flow event signaled */ public final void testGetView_RestoreWithBindings() { @@ -156,7 +166,7 @@ public class JsfViewFactoryTests extends TestCase { new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), lifecycle); - UIViewRoot existingRoot = new UIViewRoot(); + MockUIViewRoot existingRoot = new MockUIViewRoot(); existingRoot.setViewId(VIEW_ID); UIPanel panel = new UIPanel(); panel.setId("panel1"); @@ -190,11 +200,12 @@ public class JsfViewFactoryTests extends TestCase { assertFalse("An unexpected event was signaled,", restoredView.hasFlowEvent()); assertSame("The UIInput binding was not restored properly", input, testBean.getInput()); assertSame("The faceted UIOutput binding was not restored properly", output, testBean.getOutput()); + assertTrue("The PostRestoreViewEvent was not seen", existingRoot.isPostRestoreStateEventSeen()); } /** - * Ajax Request - View already exists in view/flash scope and must be restored and the lifecycle executed, no event - * signaled + * Ajax Request - View already exists in view/flash scope and must be restored and the lifecycle executed, no flow + * event signaled */ public final void testGetView_Restore_Ajax() { @@ -203,7 +214,7 @@ public class JsfViewFactoryTests extends TestCase { new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), lifecycle); - UIViewRoot existingRoot = new UIViewRoot(); + MockUIViewRoot existingRoot = new MockUIViewRoot(); existingRoot.setViewId(VIEW_ID); ((MockViewHandler) viewHandler).setRestoreView(existingRoot); @@ -223,6 +234,7 @@ public class JsfViewFactoryTests extends TestCase { assertTrue("An ViewRoot was not set", ((JsfView) restoredView).getViewRoot() instanceof UIViewRoot); assertEquals("View name did not match", VIEW_ID, ((JsfView) restoredView).getViewRoot().getViewId()); assertFalse("An unexpected event was signaled,", restoredView.hasFlowEvent()); + assertTrue("The PostRestoreViewEvent was not seen", existingRoot.isPostRestoreStateEventSeen()); } /** @@ -234,7 +246,7 @@ public class JsfViewFactoryTests extends TestCase { new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), lifecycle); - UIViewRoot newRoot = new UIViewRoot(); + MockUIViewRoot newRoot = new MockUIViewRoot(); newRoot.setViewId(VIEW_ID); jsfMock.facesContext().setViewRoot(newRoot); jsfMock.facesContext().renderResponse(); @@ -248,6 +260,30 @@ public class JsfViewFactoryTests extends TestCase { assertEquals("View name did not match", VIEW_ID, ((JsfView) newView).getViewRoot().getViewId()); assertSame("View root was not the third party instance", newRoot, ((JsfView) newView).getViewRoot()); assertFalse("An unexpected event was signaled,", newView.hasFlowEvent()); + assertTrue("The PostRestoreViewEvent was not seen", newRoot.isPostRestoreStateEventSeen()); + } + + public void testGetView_ExceptionsOnPostRestoreStateEvent() throws Exception { + lifecycle = new NoExecutionLifecycle(jsfMock.lifecycle()); + factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, + new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), + lifecycle); + + MockUIViewRoot existingRoot = new MockUIViewRoot(); + existingRoot.setThrowOnPostRestoreStateEvent(true); + existingRoot.setViewId(VIEW_ID); + ((MockViewHandler) viewHandler).setRestoreView(existingRoot); + + context.inViewState(); + EasyMock.expectLastCall().andReturn(Boolean.TRUE); + + EasyMock.replay(new Object[] { context }); + factory.getView(context); + ExceptionEventAwareMockApplication application = (ExceptionEventAwareMockApplication) FlowFacesContext + .getCurrentInstance().getApplication(); + assertNotNull("Expected exception event", application.getExceptionQueuedEventContext()); + assertSame("Expected same exception", existingRoot.getAbortProcessingException(), application + .getExceptionQueuedEventContext().getException()); } private class NoExecutionLifecycle extends FlowLifecycle { @@ -337,4 +373,51 @@ public class JsfViewFactoryTests extends TestCase { this.input = input; } } + + private static class MockUIViewRoot extends UIViewRoot { + + private boolean postRestoreStateEventSeen; + private boolean throwOnPostRestoreStateEvent; + private AbortProcessingException abortProcessingException; + + public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { + if (event instanceof PostRestoreStateEvent) { + assertSame("Component did not match", this, ((PostRestoreStateEvent) event).getComponent()); + postRestoreStateEventSeen = true; + if (throwOnPostRestoreStateEvent) { + abortProcessingException = new AbortProcessingException(); + throw abortProcessingException; + } + } + } + + public void setThrowOnPostRestoreStateEvent(boolean throwOnPostRestoreStateEvent) { + this.throwOnPostRestoreStateEvent = throwOnPostRestoreStateEvent; + } + + public boolean isPostRestoreStateEventSeen() { + return postRestoreStateEventSeen; + } + + public AbortProcessingException getAbortProcessingException() { + return abortProcessingException; + } + } + + private static class ExceptionEventAwareMockApplication extends MockApplication20 { + + private ExceptionQueuedEventContext exceptionQueuedEventContext; + + public void publishEvent(FacesContext facesContext, Class systemEventClass, Object source) { + if (ExceptionQueuedEvent.class.equals(systemEventClass)) { + this.exceptionQueuedEventContext = (ExceptionQueuedEventContext) source; + } else { + super.publishEvent(facesContext, systemEventClass, source); + } + } + + public ExceptionQueuedEventContext getExceptionQueuedEventContext() { + return exceptionQueuedEventContext; + } + } } diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/MockBaseFacesContext.java b/spring-faces/src/test/java/org/springframework/faces/webflow/MockBaseFacesContext.java index 7b4fbe08..1a891a0b 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/MockBaseFacesContext.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/MockBaseFacesContext.java @@ -38,4 +38,8 @@ public class MockBaseFacesContext extends MockFacesContext20 { } return application; } + + public void setApplication(Application application) { + this.application = application; + } } From da15ce813831896d04d4b67bd3ff2a280fd2c681 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 7 Mar 2012 05:30:57 -0500 Subject: [PATCH 14/20] Upgrade sample to PrimeFaces 3.1.1 Issues: SWF-1523 --- .../booking-faces/.classpath | 28 +++++++++---------- .../org.eclipse.wst.common.component | 26 ++++++++--------- spring-webflow-samples/booking-faces/pom.xml | 4 +-- .../samples/booking/HotelLazyDataModel.java | 13 +++++++-- .../flows/booking/enterBookingDetails.xhtml | 2 +- .../WEB-INF/flows/booking/reviewBooking.xhtml | 2 +- .../flows/main/enterSearchCriteria.xhtml | 2 +- .../webapp/WEB-INF/flows/main/main-flow.xml | 6 ++-- .../WEB-INF/flows/main/reviewHotel.xhtml | 2 +- .../WEB-INF/flows/main/reviewHotels.xhtml | 8 +++--- .../webapp/WEB-INF/layouts/standard.xhtml | 2 +- 11 files changed, 53 insertions(+), 42 deletions(-) diff --git a/spring-webflow-samples/booking-faces/.classpath b/spring-webflow-samples/booking-faces/.classpath index 4a22c3c6..3e73170c 100755 --- a/spring-webflow-samples/booking-faces/.classpath +++ b/spring-webflow-samples/booking-faces/.classpath @@ -66,30 +66,30 @@ - + - - - + + + - - - - + + + + - + - + - - - + + + - + \ No newline at end of file diff --git a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component index 820e3a2e..0539dc5b 100755 --- a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component @@ -78,7 +78,7 @@ uses - + uses @@ -87,34 +87,34 @@ uses - + uses - + uses - + uses uses - + uses - + uses - + uses - + uses uses - + uses @@ -123,7 +123,7 @@ uses - + uses @@ -135,16 +135,16 @@ uses - + uses - + uses uses - + uses diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml index 8e89d7b8..176fc473 100644 --- a/spring-webflow-samples/booking-faces/pom.xml +++ b/spring-webflow-samples/booking-faces/pom.xml @@ -8,11 +8,11 @@ Hotel Booking : Spring MVC + Web Flow + JSF/PrimeFaces 2.3.1.BUILD-SNAPSHOT - 3.0.5.RELEASE + 3.1.1.RELEASE 3.0.2.RELEASE 1.5.10 2.1.7 - 2.2.1 + 3.1.1 diff --git a/spring-webflow-samples/booking-faces/src/main/java/org/springframework/webflow/samples/booking/HotelLazyDataModel.java b/spring-webflow-samples/booking-faces/src/main/java/org/springframework/webflow/samples/booking/HotelLazyDataModel.java index 9e914e91..cdcb2cbf 100644 --- a/spring-webflow-samples/booking-faces/src/main/java/org/springframework/webflow/samples/booking/HotelLazyDataModel.java +++ b/spring-webflow-samples/booking-faces/src/main/java/org/springframework/webflow/samples/booking/HotelLazyDataModel.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Map; import org.primefaces.model.LazyDataModel; +import org.primefaces.model.SortOrder; public class HotelLazyDataModel extends LazyDataModel { @@ -24,9 +25,9 @@ public class HotelLazyDataModel extends LazyDataModel { } @Override - public List load(int first, int pageSize, String sortField, boolean sortOrder, Map filters) { + public List load(int first, int pageSize, String sortField, SortOrder sortOrder, Map filters) { searchCriteria.setCurrentPage(first / pageSize + 1); - return bookingService.findHotels(searchCriteria, first, sortField, sortOrder); + return bookingService.findHotels(searchCriteria, first, sortField, sortOrder.equals(SortOrder.ASCENDING)); } @Override @@ -42,4 +43,12 @@ public class HotelLazyDataModel extends LazyDataModel { this.selected = selected; } + public int getCurrentPage() { + return this.searchCriteria.getCurrentPage(); + } + + public int getPageSize() { + return this.searchCriteria.getPageSize(); + } + } \ No newline at end of file diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/enterBookingDetails.xhtml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/enterBookingDetails.xhtml index 784d0dd0..fe286ec7 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/enterBookingDetails.xhtml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/enterBookingDetails.xhtml @@ -3,7 +3,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.prime.com.tr/ui" + xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layouts/standard.xhtml">

diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/reviewBooking.xhtml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/reviewBooking.xhtml index bd22b15e..1f150988 100755 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/reviewBooking.xhtml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/booking/reviewBooking.xhtml @@ -3,7 +3,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.prime.com.tr/ui" + xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layouts/standard.xhtml">

diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.xhtml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.xhtml index 346c3914..1d8e38b0 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.xhtml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.xhtml @@ -3,7 +3,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.prime.com.tr/ui" + xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layouts/standard.xhtml"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/main-flow.xml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/main-flow.xml index db77b19c..0ad4cc84 100755 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/main-flow.xml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/main-flow.xml @@ -1,7 +1,9 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://www.springframework.org/schema/webflow + http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotel.xhtml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotel.xhtml index 363168c8..cbe13aa2 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotel.xhtml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotel.xhtml @@ -3,7 +3,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.prime.com.tr/ui" + xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layouts/standard.xhtml">

diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotels.xhtml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotels.xhtml index d9f63389..8a79fe30 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotels.xhtml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/flows/main/reviewHotels.xhtml @@ -3,7 +3,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.prime.com.tr/ui" + xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layouts/standard.xhtml">

@@ -18,8 +18,8 @@ - + Hotel Search Results
@@ -42,7 +42,7 @@ Action - + diff --git a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/layouts/standard.xhtml b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/layouts/standard.xhtml index d17cbcff..bb14d6b4 100644 --- a/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/layouts/standard.xhtml +++ b/spring-webflow-samples/booking-faces/src/main/webapp/WEB-INF/layouts/standard.xhtml @@ -4,7 +4,7 @@ xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:p="http://primefaces.prime.com.tr/ui"> + xmlns:p="http://primefaces.org/ui"> From 3b1af34482189b495533ea47e9c18e385a4224e9 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 14 Mar 2012 12:27:04 -0400 Subject: [PATCH 15/20] Check request param to recognize JSF 2 Ajax requests Previously we checked the "Faces-Request" header only. Now we try to delegate the call to PartialViewContext.isAjaxRequest() first. If a FacesContext is unavailble for some reason we also check the "javax.faces.partial.ajax" request parameter. --- build-spring-webflow/resources/changelog.txt | 9 +++++++-- .../faces/webflow/JsfAjaxHandler.java | 12 +++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 5e41e688..144e4d9f 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -7,9 +7,14 @@ Changes in version 2.3.1.RELEASE Upgrade JSF Mojarra version to 2.1.7 Modify Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors Recognize class-level bean validation messages in BindingResult.getGlobalErrors() -Fix "embedded" mode to be flow session local, i.e. specific to a specific flow or subflow. +Ensure "embedded" mode is flow session local, i.e. specific to a specific flow or subflow Allow JSF view root to survive redirect in same state (following fix in JSF Mojarra 2.1) -Ensure PostRestoreStateEvent is delivered to registered listeners. +Ensure PostRestoreStateEvent is delivered to registered listeners +Upgrade booking-faces sample to use PrimeFaces 3.1.1 +Fix NullPointerException in FlowViewStateManager when not in a flow request +Move source code to http://github.com/SpringSource/spring-webflow +Modify FlowPartialViewContext to return a modifiable List to comply with its contract +Check request parameter in addition to request header to recognize JSF 2 Ajax requests. Changes in version 2.3.0.RELEASE (Feb 28, 2011) ----------------------------------------------- diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java index b9934c07..1678b0d3 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2004-2010 the original author or authors. + * Copyright 2004-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,8 +50,14 @@ public class JsfAjaxHandler extends AbstractAjaxHandler { } protected boolean isAjaxRequestInternal(HttpServletRequest request, HttpServletResponse response) { - String facesRequestHeader = request.getHeader("Faces-Request"); - return ("partial/ajax".equals(facesRequestHeader)) ? true : false; + FacesContext facesContext = FlowFacesContext.getCurrentInstance(); + if (facesContext != null) { + return facesContext.getPartialViewContext().isAjaxRequest(); + } else { + String header = request.getHeader("Faces-Request"); + String param = request.getParameter("javax.faces.partial.ajax"); + return ("partial/ajax".equals(header) || "true".equals(param)) ? true : false; + } } protected void sendAjaxRedirectInternal(final String targetUrl, final HttpServletRequest request, From b82884aff2c2e394eb8a2d383076cbfbae207355 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 26 Mar 2012 12:36:24 -0400 Subject: [PATCH 16/20] Correct spring-binding/.classpath to use IVY_CACHE --- spring-binding/.classpath | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/spring-binding/.classpath b/spring-binding/.classpath index 6e8d7986..ef591a61 100644 --- a/spring-binding/.classpath +++ b/spring-binding/.classpath @@ -3,20 +3,17 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + - \ No newline at end of file + From 8aec740bd8ed96f869413f95cf219d889d695011 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 26 Mar 2012 16:27:53 -0400 Subject: [PATCH 17/20] Updates to readme, javadoc, and sample poms. Issues: SWF-1507 --- build-spring-webflow/resources/readme.txt | 77 ++++++------- spring-binding/src/main/java/overview.html | 7 -- spring-build/common/common.xml | 2 +- spring-build/multi-bundle/common.xml | 4 +- .../booking-faces/.classpath | 50 ++------- spring-webflow-samples/booking-faces/pom.xml | 32 +----- spring-webflow-samples/booking-mvc/.classpath | 92 +++------------- spring-webflow-samples/booking-mvc/pom.xml | 23 +--- .../booking-portlet-faces/.classpath | 62 ++--------- .../booking-portlet-faces/pom.xml | 23 +--- .../booking-portlet-mvc/.classpath | 56 ++-------- .../booking-portlet-mvc/pom.xml | 23 +--- spring-webflow-samples/jsf-booking/.classpath | 36 ++----- .../org.eclipse.wst.common.component | 4 +- spring-webflow-samples/jsf-booking/pom.xml | 31 +----- spring-webflow/src/main/java/overview.html | 101 ++++-------------- 16 files changed, 129 insertions(+), 494 deletions(-) delete mode 100644 spring-binding/src/main/java/overview.html diff --git a/build-spring-webflow/resources/readme.txt b/build-spring-webflow/resources/readme.txt index 242863eb..64587975 100644 --- a/build-spring-webflow/resources/readme.txt +++ b/build-spring-webflow/resources/readme.txt @@ -78,97 +78,82 @@ For an exact list of project dependencies, see each project's ivy file at "proje ------------------ This distribution contains documentation and sample applications demonstrating the features of the Spring Web Flow projects. A great way to get started is to review and run the sample applications, supplementing with reference manual material as you go. -To build deployable .war files for all samples, simply access the projects/build-spring-webflow directory and run ant. -All projects are directly importable into Eclipse as "Dynamic Web Projects". -See http://www.springframework.org/webflow-samples for more information. +To build deployable .war files for the samples, access the projects/spring-webflow-samples directory and run "mvn package". +Sample projects can be imported into an IDE as Maven projects or by generating IDE settings (e.g. "mvn eclipse:eclipse"). -5. OBTAINING RELEASE JARS FROM THE SPRINGSOURCE BUNDLE REPOSITORY ------------------------------------------------------------------ -Each jar in the Web Flow distribution is available in the SpringSource release repository. -These jars may be accessed using Maven or Ivy dependency managers. -Browse the contents of the repository by accessing http://www.springsource.com/repository. +5. OBTAINING RELEASE JARS WITH MAVEN OR IVY +------------------------------------------- +Release versions of Spring Web Flow artifacts are available via Maven Central. -To access jars using Maven, add the following repositories to your Maven pom: +For milestones and snapshots only (and for Ivy dependencies) you'll need to use the +SpringSource repository. Add the following repository to your Maven pom.xml: - com.springsource.repository.bundles.release - SpringSource Enterprise Bundle Repository - SpringSource Releases - http://repository.springsource.com/maven/bundles/release + spring-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot - - com.springsource.repository.bundles.external - SpringSource Enterprise Bundle Repository - External Releases - http://repository.springsource.com/maven/bundles/external - - -Then declare the following dependencies (note that many times it's sufficient to include -org.springframework.webflow only, which will give you org.springframework.binding, -org.springframework.js, and org.springframework.js via transitive dependencies): +Then declare the following dependencies (note that many times it's sufficient +to include spring-webflow only, which will give you spring-binding and spring-js +via transitive dependencies): org.springframework.webflow - org.springframework.binding + spring-binding 2.3.1.RELEASE org.springframework.webflow - org.springframework.js + spring-js 2.3.1.RELEASE org.springframework.webflow - org.springframework.webflow + spring-webflow 2.3.1.RELEASE -If using JavaServerFaces all you need to include is: +If using JSF all you need to include is: org.springframework.webflow - org.springframework.faces + spring-faces 2.3.1.RELEASE To access jars using Ivy, add the following repositories to your Ivy config: - - - + + + - - - + + + Then declare the following dependencies in your ivy.xml: - - - + + + If using JavaServerFaces: - + -Refer to the reference documentation for more coverage on obtaining Web Flow jars using Maven or Ivy. +For more information see the SpringSource Repository FAQ: +https://github.com/SpringSource/spring-framework/wiki/SpringSource-repository-FAQ 6. ADDITIONAL RESOURCES ----------------------- The Spring Web Flow homepage is located at: - http://www.springframework.org/webflow - -There you will find resources such as a 'Quick Start' guide and a 'Frequently Asked Questions' section. + http://www.springsource.org/spring-web-flow The Spring Web Flow community forums are located at: http://forum.springframework.org - -There you will find an active community of users collaborating about the project. -The Spring Community portal is located at: - http://www.springframework.org - -There you will find links to many resources on Spring Portfolio projects, including on-line access to Spring documentation. diff --git a/spring-binding/src/main/java/overview.html b/spring-binding/src/main/java/overview.html deleted file mode 100644 index 1eb7a2e8..00000000 --- a/spring-binding/src/main/java/overview.html +++ /dev/null @@ -1,7 +0,0 @@ - - -

-The Spring Data Binding framework, an internal library used by Spring Web Flow. -

- - \ No newline at end of file diff --git a/spring-build/common/common.xml b/spring-build/common/common.xml index 4973529a..690cc193 100644 --- a/spring-build/common/common.xml +++ b/spring-build/common/common.xml @@ -237,4 +237,4 @@ - \ No newline at end of file + diff --git a/spring-build/multi-bundle/common.xml b/spring-build/multi-bundle/common.xml index e1d72134..26b311ac 100644 --- a/spring-build/multi-bundle/common.xml +++ b/spring-build/multi-bundle/common.xml @@ -104,7 +104,7 @@ + stylesheetfile="${javadoc.stylesheet.file}" splitindex="true" useexternalfile="true" overview="@{input.dir}/overview.html">
]]>
@@ -117,4 +117,4 @@ - \ No newline at end of file + diff --git a/spring-webflow-samples/booking-faces/.classpath b/spring-webflow-samples/booking-faces/.classpath index 3e73170c..4c7c4b07 100755 --- a/spring-webflow-samples/booking-faces/.classpath +++ b/spring-webflow-samples/booking-faces/.classpath @@ -9,55 +9,23 @@ - - - - - + - + - - - - - - - - - - - - - - - + + + - - - - - + - - - - - + - - - - - - - - - - + + diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml index 176fc473..ea0be316 100644 --- a/spring-webflow-samples/booking-faces/pom.xml +++ b/spring-webflow-samples/booking-faces/pom.xml @@ -185,37 +185,13 @@
- - org.maven.central - Maven Central Repository - http://repo1.maven.org/maven2 - false + spring-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot - - org.springframework.maven.snapshot - Spring Maven Snapshot Repository - http://maven.springframework.org/snapshot - false - true - - - - org.springframework.maven.milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - false - - - - java.net.release - Repository for Projects On Hosted on java.net - http://download.java.net/maven/2 - - - - primefaces + primefaces-repository Prime Technology Maven Repository http://repository.primefaces.org default diff --git a/spring-webflow-samples/booking-mvc/.classpath b/spring-webflow-samples/booking-mvc/.classpath index 25fa2769..8300e496 100755 --- a/spring-webflow-samples/booking-mvc/.classpath +++ b/spring-webflow-samples/booking-mvc/.classpath @@ -11,74 +11,30 @@ - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - + - - - - - + - - - - - + - - - - - - - - - - + + @@ -105,26 +61,10 @@ - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-mvc/pom.xml b/spring-webflow-samples/booking-mvc/pom.xml index 98daf2d2..2a88b252 100644 --- a/spring-webflow-samples/booking-mvc/pom.xml +++ b/spring-webflow-samples/booking-mvc/pom.xml @@ -208,28 +208,11 @@
- - org.maven.central - Maven Central Repository - http://repo1.maven.org/maven2/ - false + spring-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot - - - org.springframework.maven.snapshot - Spring Maven Snapshot Repository - http://maven.springframework.org/snapshot - false - true - - - - org.springframework.maven.milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - false - booking-mvc diff --git a/spring-webflow-samples/booking-portlet-faces/.classpath b/spring-webflow-samples/booking-portlet-faces/.classpath index 8156d631..1c5d0346 100644 --- a/spring-webflow-samples/booking-portlet-faces/.classpath +++ b/spring-webflow-samples/booking-portlet-faces/.classpath @@ -10,70 +10,30 @@ - - - - - + - - - - - - - - - - - - - - - - + + + + - - - - - + - - - - - + - - - - - + - - - - - - - - - - + + - - - - - + diff --git a/spring-webflow-samples/booking-portlet-faces/pom.xml b/spring-webflow-samples/booking-portlet-faces/pom.xml index 950df72e..17a7dcfa 100644 --- a/spring-webflow-samples/booking-portlet-faces/pom.xml +++ b/spring-webflow-samples/booking-portlet-faces/pom.xml @@ -170,28 +170,11 @@
- - org.maven.central - Maven Central Repository - http://repo1.maven.org/maven2 - false + spring-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot - - - org.springframework.maven.snapshot - Spring Maven Snapshot Repository - http://maven.springframework.org/snapshot - false - true - - - - org.springframework.maven.milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - false - booking-portlet-faces diff --git a/spring-webflow-samples/booking-portlet-mvc/.classpath b/spring-webflow-samples/booking-portlet-mvc/.classpath index 583c72c7..4e91487c 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.classpath +++ b/spring-webflow-samples/booking-portlet-mvc/.classpath @@ -11,62 +11,26 @@ - - - - - + - - - - - - - - - - - - - - - - + + + + - - - - - + - - - - - + - - - - - + - - - - - - - - - - + + diff --git a/spring-webflow-samples/booking-portlet-mvc/pom.xml b/spring-webflow-samples/booking-portlet-mvc/pom.xml index e1215cfd..819aebc9 100644 --- a/spring-webflow-samples/booking-portlet-mvc/pom.xml +++ b/spring-webflow-samples/booking-portlet-mvc/pom.xml @@ -175,28 +175,11 @@
- - org.maven.central - Maven Central Repository - http://repo1.maven.org/maven2 - false + spring-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot - - - org.springframework.maven.snapshot - Spring Maven Snapshot Repository - http://maven.springframework.org/snapshot - false - true - - - - org.springframework.maven.milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - false - booking-portlet-mvc diff --git a/spring-webflow-samples/jsf-booking/.classpath b/spring-webflow-samples/jsf-booking/.classpath index 65c3eeb3..859f9d1f 100644 --- a/spring-webflow-samples/jsf-booking/.classpath +++ b/spring-webflow-samples/jsf-booking/.classpath @@ -8,41 +8,21 @@ - - - - - - - - - - - + + + - - - - - + - - - - - + - - - - - + - - + + diff --git a/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component index 0da81cfa..2be3ead4 100644 --- a/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component @@ -45,10 +45,10 @@ uses - + uses - + uses diff --git a/spring-webflow-samples/jsf-booking/pom.xml b/spring-webflow-samples/jsf-booking/pom.xml index 1f944a97..1308bf2c 100644 --- a/spring-webflow-samples/jsf-booking/pom.xml +++ b/spring-webflow-samples/jsf-booking/pom.xml @@ -10,7 +10,7 @@ 3.0.5.RELEASE 1.5.10 - 2.0.3 + 2.1.7 @@ -133,33 +133,10 @@
- - org.maven.central - Maven Central Repository - http://repo1.maven.org/maven2 - false - - - - org.springframework.maven.snapshot - Spring Maven Snapshot Repository - http://maven.springframework.org/snapshot - false - true - - - - org.springframework.maven.milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - false - - - - java.net.release - Repository for Projects On Hosted on java.net - http://download.java.net/maven/2 + spring-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot diff --git a/spring-webflow/src/main/java/overview.html b/spring-webflow/src/main/java/overview.html index 4bc7241f..84d0c175 100644 --- a/spring-webflow/src/main/java/overview.html +++ b/spring-webflow/src/main/java/overview.html @@ -2,84 +2,27 @@


-The public Java Documentation for Spring Web Flow, a framework for modeling and executing user interface flow. +The public Java Documentation for the Spring Web Flow project.

-

-Spring Web Flow's packages are partitioned across a set of logical layers. Higher layers depend on the layers directly beneath. Lower layers never depend on higher layers. -

-

-The layers of Spring Web Flow, from lowest to highest, are shown below: -

-

- -
-Layer architecture diagram -

-

-The description, subsystems, and source packages of each layer are summarized below: -

-

Execution Core Layer

-

-Contains the central public Spring Web Flow API elements. This includes elements to model flow definitions -as well as execute those flow definitions. As the "bottom layer", this layer defines key domain interfaces and is highly stable. -

-

Subsystems

-
    -
  1. {@link org.springframework.webflow.core Core} -
  2. {@link org.springframework.webflow.definition Flow Definition} -
  3. {@link org.springframework.webflow.definition.registry Flow Definition Registry} -
  4. {@link org.springframework.webflow.context External Context} -
  5. {@link org.springframework.webflow.conversation Conversation} -
  6. {@link org.springframework.webflow.execution Flow Execution} -
  7. {@link org.springframework.webflow.execution.repository Flow Execution Repository} -
  8. {@link org.springframework.webflow.action Action} -
  9. {@link org.springframework.webflow.util Util} -
-

Executor Layer

-

-Contains services called "flow executors" that drive the execution of flow definitions. This layer defines the -core FlowExecutor service interface and implementation, as well as adaption code for executing flows in several -specific environments. Support for Spring MVC, Struts, and Java Server Faces (JSF) environments is housed here. -This layer depends on the stable Execution Core, but is not coupled to the more volatile Execution Engine -implementation. -

-

Subsystems

-
    -
  1. {@link org.springframework.webflow.executor Core} -
  2. {@link org.springframework.webflow.executor.mvc Spring MVC} -
  3. {@link org.springframework.webflow.executor.struts Struts} -
  4. {@link org.springframework.webflow.executor.jsf Java Server Faces (JSF)} -
-

Execution Engine Layer

-

-Contains concrete implementations of the stable Execution Engine abstractions. This layer defines the -finite-state machine that carries out runtime flow execution. It also contains a builder subsystem for -assembling flows from externalized resources such as XML files. -

-

Subsystems

-
    -
  1. {@link org.springframework.webflow.engine Engine Implementation} -
  2. {@link org.springframework.webflow.engine.builder Flow Builder} -
-

Test Layer

-

-Contains support code for testing flow executions. Two types of support are provided: stubs for unit -testing engine artifacts, and base classes for writing flow execution integration tests. This layer -depends on the Execution Core and Execution Engine layers. -

-

Subsystems

-
    -
  1. {@link org.springframework.webflow.test Unit Test} -
  2. {@link org.springframework.webflow.test.execution Execution Test} -
-

System Configuration Layer

-

Subsystems

-

-Contains support for configuring the flow executor engine using Spring. A Spring 2.0 config schema is provided. -This is the top layer and depends on the Execution Core, Executor, and Execution Engine layers. -

-
    -
  1. {@link org.springframework.webflow.config Spring Configuration Support} -
+

Spring Web Flow facilitates building web applications that require guided navigation -- e.g. a shopping cart, flight check-in, a loan application, and many others. In contrast to stateless, free-form navigation such use cases have a clear start and end point, one or more screens to go through in a specific order, and a set of changes that are not finalized to the end.

+ +

A distinguishing feature is the ability to define a flow definition consisting of states, transitions, and data. For example, view states correspond to the individual screens of the flow while transitions are caused by events resulting from the click of a button or a link. Data may be stored in scopes such as flash, view, flow, and others. Scoped data is cleared when it is no longer in scope.

+ +

In REST terms a flow represents as a single resource. The same URL used to start the flow is also the URL used to step through the flow (there is also an execution key uniquely identifying the current flow instance). As a result of this approach navigation remains encapsulated in the flow definition.

+ +

Some key benefits of using Spring Web Flow:

+ +
    +
  • A flow abstraction to model "long conversations" in web applications
  • +
  • Proper encapsulation for navigation rules
  • +
  • Multiple scopes in which to keep data
  • +
  • Automatic use of the POST/REDIRECT/GET pattern to avoid browser warnings
  • +
  • Impossible to return to completed flow sessions via browser back button
  • +
  • Rapid prototyping of flow requirements
  • +
  • Development mode in which flow definition changes are detected on the fly
  • +
  • IDE visualization for flow definitions
  • +
  • Much more...
  • +
+ - \ No newline at end of file + From dddcf7a25810420b243496822a31f33b91e32eaf Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 26 Mar 2012 18:20:09 -0400 Subject: [PATCH 18/20] Upgrade to Spring 3.1.1 --- spring-binding/.classpath | 8 +++--- spring-binding/ivy.xml | 8 +++--- spring-binding/pom.xml | 2 +- .../ELExpressionParserCompatibilityTests.java | 19 +++++++------ spring-binding/template.mf | 2 +- spring-faces/.classpath | 14 +++++----- spring-faces/ivy.xml | 16 +++++------ spring-faces/pom.xml | 2 +- spring-faces/template.mf | 2 +- spring-js-resources/.classpath | 16 +++++------ spring-js/.classpath | 16 +++++------ spring-js/ivy.xml | 16 +++++------ spring-js/pom.xml | 2 +- spring-js/template.mf | 2 +- spring-webflow-samples/booking-mvc/.classpath | 26 ++++++++--------- .../org.eclipse.wst.common.component | 24 ++++++++-------- spring-webflow-samples/booking-mvc/pom.xml | 2 +- .../booking-portlet-faces/.classpath | 28 +++++++++---------- .../org.eclipse.wst.common.component | 26 ++++++++--------- .../booking-portlet-faces/pom.xml | 2 +- .../booking-portlet-mvc/.classpath | 28 +++++++++---------- .../org.eclipse.wst.common.component | 26 ++++++++--------- .../booking-portlet-mvc/pom.xml | 2 +- spring-webflow-samples/jsf-booking/.classpath | 22 +++++++-------- .../org.eclipse.wst.common.component | 20 ++++++------- spring-webflow-samples/jsf-booking/pom.xml | 2 +- spring-webflow/.classpath | 24 ++++++++-------- spring-webflow/ivy.xml | 26 ++++++++--------- spring-webflow/pom.xml | 2 +- .../webflow/mvc/view/BindingModel.java | 4 +++ .../mvc/view/AbstractBindingModelTests.java | 3 +- spring-webflow/template.mf | 8 +++--- 32 files changed, 203 insertions(+), 197 deletions(-) diff --git a/spring-binding/.classpath b/spring-binding/.classpath index ef591a61..2f738604 100644 --- a/spring-binding/.classpath +++ b/spring-binding/.classpath @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/spring-binding/ivy.xml b/spring-binding/ivy.xml index e6d58dfb..87bb87be 100644 --- a/spring-binding/ivy.xml +++ b/spring-binding/ivy.xml @@ -23,10 +23,10 @@ - - - - + + + + diff --git a/spring-binding/pom.xml b/spring-binding/pom.xml index fd164f6c..84117737 100644 --- a/spring-binding/pom.xml +++ b/spring-binding/pom.xml @@ -125,6 +125,6 @@
- 3.0.5.RELEASE + 3.1.1.RELEASE diff --git a/spring-binding/src/test/java/org/springframework/binding/expression/spel/ELExpressionParserCompatibilityTests.java b/spring-binding/src/test/java/org/springframework/binding/expression/spel/ELExpressionParserCompatibilityTests.java index d29b8ea4..955ba3e6 100644 --- a/spring-binding/src/test/java/org/springframework/binding/expression/spel/ELExpressionParserCompatibilityTests.java +++ b/spring-binding/src/test/java/org/springframework/binding/expression/spel/ELExpressionParserCompatibilityTests.java @@ -107,8 +107,8 @@ public class ELExpressionParserCompatibilityTests extends TestCase { public void testParseBeanEvalExpressionInvalidELVariable() { try { String expressionString = "bogus"; - Expression exp = parser.parseExpression(expressionString, new FluentParserContext() - .evaluate(TestBean.class)); + Expression exp = parser.parseExpression(expressionString, + new FluentParserContext().evaluate(TestBean.class)); exp.getValue(new TestBean()); fail("Should have failed"); } catch (EvaluationException e) { @@ -131,8 +131,8 @@ public class ELExpressionParserCompatibilityTests extends TestCase { public void testParseTemplateExpressionWithVariables() { String expressionString = "#{value}#{#max}"; - Expression exp = parser.parseExpression(expressionString, new FluentParserContext().template().variable( - new ExpressionVariable("max", "maximum"))); + Expression exp = parser.parseExpression(expressionString, + new FluentParserContext().template().variable(new ExpressionVariable("max", "maximum"))); TestBean target = new TestBean(); assertEquals("foo2", exp.getValue(target)); // TODO: } @@ -147,7 +147,8 @@ public class ELExpressionParserCompatibilityTests extends TestCase { String expressionString = "maximum"; Expression exp = parser.parseExpression(expressionString, null); TestBean context = new TestBean(); - assertEquals(int.class, exp.getValueType(context)); + Class clazz = exp.getValueType(context); + assertTrue(int.class.equals(clazz) || Integer.class.equals(clazz)); } public void testGetValueWithCoersion() { @@ -159,8 +160,8 @@ public class ELExpressionParserCompatibilityTests extends TestCase { public void testGetValueCoersionError() { String expressionString = "maximum"; - Expression exp = parser.parseExpression(expressionString, new FluentParserContext() - .expectResult(TestBean.class)); + Expression exp = parser.parseExpression(expressionString, + new FluentParserContext().expectResult(TestBean.class)); TestBean context = new TestBean(); try { exp.getValue(context); @@ -202,8 +203,8 @@ public class ELExpressionParserCompatibilityTests extends TestCase { } public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { - return new TypedValue("Custom resolver resolved this special property!", TypeDescriptor - .valueOf(String.class)); + return new TypedValue("Custom resolver resolved this special property!", + TypeDescriptor.valueOf(String.class)); } public Class[] getSpecificTargetClasses() { diff --git a/spring-binding/template.mf b/spring-binding/template.mf index d82b70ae..f8a22b89 100644 --- a/spring-binding/template.mf +++ b/spring-binding/template.mf @@ -6,7 +6,7 @@ Import-Package: ognl;version="[2.6.9, 3.0.0)";resolution:=optional, org.jboss.el;version="[2.0.0, 3.0.0)";resolution:=optional Import-Template: - org.springframework.*;version="[3.0.5.RELEASE, 3.1.0)", + org.springframework.*;version="[3.1.0.RELEASE, 3.2.0)", org.apache.commons.logging;version="[1.1.1, 2.0.0)", javax.el;version="[1.0.0, 2.0.0)";resolution:=optional, ognl;version="[2.6.9, 3.0.0)";resolution:=optional, diff --git a/spring-faces/.classpath b/spring-faces/.classpath index 8107e410..5967530f 100644 --- a/spring-faces/.classpath +++ b/spring-faces/.classpath @@ -23,13 +23,13 @@ - - - - - - - + + + + + + + diff --git a/spring-faces/ivy.xml b/spring-faces/ivy.xml index 71d26378..2b093dd6 100644 --- a/spring-faces/ivy.xml +++ b/spring-faces/ivy.xml @@ -32,13 +32,13 @@ - - - - - - - + + + + + + + @@ -75,7 +75,7 @@ - + diff --git a/spring-faces/pom.xml b/spring-faces/pom.xml index 4fc05e30..3bc7a813 100644 --- a/spring-faces/pom.xml +++ b/spring-faces/pom.xml @@ -216,6 +216,6 @@ - 3.0.5.RELEASE + 3.1.1.RELEASE diff --git a/spring-faces/template.mf b/spring-faces/template.mf index ac6c098c..ffe4944d 100644 --- a/spring-faces/template.mf +++ b/spring-faces/template.mf @@ -8,7 +8,7 @@ Import-Template: org.springframework.binding.*;version="[2.3.0, 2.4.0)", org.springframework.js.*;version="[2.3.0, 2.4.0)", org.springframework.webflow.*;version="[2.3.0, 2.4.0)", - org.springframework.*;version="[3.0.5.RELEASE, 3.1.0)", + org.springframework.*;version="[3.1.0.RELEASE, 3.2.0)", org.apache.commons.logging;version="[1.1.1, 2.0.0)", javax.el;version="[1.0.0, 2.0.0)", javax.portlet;version="[2.0.0, 3.0.0)";resolution:=optional, diff --git a/spring-js-resources/.classpath b/spring-js-resources/.classpath index abba49bf..585b2fd2 100644 --- a/spring-js-resources/.classpath +++ b/spring-js-resources/.classpath @@ -14,14 +14,14 @@ - - - - - - - - + + + + + + + + diff --git a/spring-js/.classpath b/spring-js/.classpath index abba49bf..585b2fd2 100644 --- a/spring-js/.classpath +++ b/spring-js/.classpath @@ -14,14 +14,14 @@ - - - - - - - - + + + + + + + + diff --git a/spring-js/ivy.xml b/spring-js/ivy.xml index 9e026fdc..1fc2aba3 100644 --- a/spring-js/ivy.xml +++ b/spring-js/ivy.xml @@ -4,7 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" version="1.3"> - + @@ -26,21 +26,21 @@ - - - - - + + + + + - + - + diff --git a/spring-js/pom.xml b/spring-js/pom.xml index c5fe5d78..817f7ce7 100644 --- a/spring-js/pom.xml +++ b/spring-js/pom.xml @@ -143,6 +143,6 @@ - 3.0.5.RELEASE + 3.1.1.RELEASE diff --git a/spring-js/template.mf b/spring-js/template.mf index 0f228cc8..9e696226 100644 --- a/spring-js/template.mf +++ b/spring-js/template.mf @@ -3,7 +3,7 @@ Bundle-Name: Spring JS Bundle-Vendor: SpringSource Bundle-ManifestVersion: 2 Import-Template: - org.springframework.*;version="[3.0.5.RELEASE, 3.1.0)", + org.springframework.*;version="[3.1.0.RELEASE, 3.2.0)", org.apache.commons.logging;version="[1.1.1, 2.0.0)", javax.servlet;version="[2.4.0, 3.0.0)", javax.servlet.http;version="[2.4.0, 3.0.0)", diff --git a/spring-webflow-samples/booking-mvc/.classpath b/spring-webflow-samples/booking-mvc/.classpath index 8300e496..d467be58 100755 --- a/spring-webflow-samples/booking-mvc/.classpath +++ b/spring-webflow-samples/booking-mvc/.classpath @@ -39,28 +39,28 @@ - - - + + + - - - - - + + + + + - + - - - + + + - + diff --git a/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component index c42990b6..c77e75d8 100755 --- a/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component @@ -90,31 +90,31 @@ uses - + uses - + uses - + uses uses - + uses - + uses - + uses - + uses - + uses @@ -123,7 +123,7 @@ uses - + uses @@ -141,16 +141,16 @@ uses - + uses - + uses uses - + uses diff --git a/spring-webflow-samples/booking-mvc/pom.xml b/spring-webflow-samples/booking-mvc/pom.xml index 2a88b252..5ae82128 100644 --- a/spring-webflow-samples/booking-mvc/pom.xml +++ b/spring-webflow-samples/booking-mvc/pom.xml @@ -8,7 +8,7 @@ Hotel Booking : Spring MVC + Web Flow + JSP 2.3.1.BUILD-SNAPSHOT - 3.0.5.RELEASE + 3.1.1.RELEASE 3.0.2.RELEASE 1.5.10 diff --git a/spring-webflow-samples/booking-portlet-faces/.classpath b/spring-webflow-samples/booking-portlet-faces/.classpath index 1c5d0346..3e68d0aa 100644 --- a/spring-webflow-samples/booking-portlet-faces/.classpath +++ b/spring-webflow-samples/booking-portlet-faces/.classpath @@ -40,25 +40,25 @@ - - - + + + - - - - + + + + - + - - - - + + + + - - + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component index 2c89b1d1..9b0d5858 100644 --- a/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component @@ -93,34 +93,34 @@ uses - + uses - + uses - + uses uses - + uses - + uses - + uses - + uses uses - + uses @@ -129,22 +129,22 @@ uses - + uses - + uses - + uses uses - + uses - + uses diff --git a/spring-webflow-samples/booking-portlet-faces/pom.xml b/spring-webflow-samples/booking-portlet-faces/pom.xml index 17a7dcfa..4069efce 100644 --- a/spring-webflow-samples/booking-portlet-faces/pom.xml +++ b/spring-webflow-samples/booking-portlet-faces/pom.xml @@ -8,7 +8,7 @@ Hotel Booking : Spring Portlet MVC + Web Flow + JSF 2.3.1.BUILD-SNAPSHOT - 3.0.5.RELEASE + 3.1.1.RELEASE 1.5.10 1.2.9 diff --git a/spring-webflow-samples/booking-portlet-mvc/.classpath b/spring-webflow-samples/booking-portlet-mvc/.classpath index 4e91487c..a54663f2 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.classpath +++ b/spring-webflow-samples/booking-portlet-mvc/.classpath @@ -35,24 +35,24 @@ - - - + + + - - - - - + + + + + - - - - + + + + - - + + \ No newline at end of file diff --git a/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component index 805f7ea3..d69d96d2 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component @@ -78,31 +78,31 @@ uses - + uses - + uses - + uses uses - + uses - + uses - + uses - + uses - + uses @@ -111,22 +111,22 @@ uses - + uses - + uses - + uses uses - + uses - + uses diff --git a/spring-webflow-samples/booking-portlet-mvc/pom.xml b/spring-webflow-samples/booking-portlet-mvc/pom.xml index 819aebc9..85b03dd4 100644 --- a/spring-webflow-samples/booking-portlet-mvc/pom.xml +++ b/spring-webflow-samples/booking-portlet-mvc/pom.xml @@ -8,7 +8,7 @@ Hotel Booking : Spring Portlet MVC + Web Flow + JSP 2.3.1.BUILD-SNAPSHOT - 3.0.5.RELEASE + 3.1.1.RELEASE 1.5.10 diff --git a/spring-webflow-samples/jsf-booking/.classpath b/spring-webflow-samples/jsf-booking/.classpath index 859f9d1f..877ae6bd 100644 --- a/spring-webflow-samples/jsf-booking/.classpath +++ b/spring-webflow-samples/jsf-booking/.classpath @@ -27,17 +27,17 @@ - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component index 2be3ead4..02fa66ee 100644 --- a/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/jsf-booking/.settings/org.eclipse.wst.common.component @@ -63,34 +63,34 @@ uses - + uses - + uses - + uses - + uses - + uses - + uses - + uses - + uses - + uses - + uses diff --git a/spring-webflow-samples/jsf-booking/pom.xml b/spring-webflow-samples/jsf-booking/pom.xml index 1308bf2c..bf204aa9 100644 --- a/spring-webflow-samples/jsf-booking/pom.xml +++ b/spring-webflow-samples/jsf-booking/pom.xml @@ -8,7 +8,7 @@ Hotel Booking : Spring Framework + JSF 2.3.1.BUILD-SNAPSHOT - 3.0.5.RELEASE + 3.1.1.RELEASE 1.5.10 2.1.7 diff --git a/spring-webflow/.classpath b/spring-webflow/.classpath index e6e3a229..462f3631 100644 --- a/spring-webflow/.classpath +++ b/spring-webflow/.classpath @@ -34,18 +34,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/spring-webflow/ivy.xml b/spring-webflow/ivy.xml index 56631af3..a2747d53 100644 --- a/spring-webflow/ivy.xml +++ b/spring-webflow/ivy.xml @@ -30,15 +30,15 @@ - - - - - - - - - + + + + + + + + + @@ -52,10 +52,10 @@ - - - - + + + + \ No newline at end of file diff --git a/spring-webflow/pom.xml b/spring-webflow/pom.xml index 61221a52..5dcf7c19 100644 --- a/spring-webflow/pom.xml +++ b/spring-webflow/pom.xml @@ -256,6 +256,6 @@ - 3.0.5.RELEASE + 3.1.1.RELEASE diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java index 4e8e62ff..dfea1d67 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java @@ -209,6 +209,10 @@ public class BindingModel extends AbstractErrors implements BindingResult { throw new UnsupportedOperationException("Should not be called during view rendering"); } + public String[] resolveMessageCodes(String errorCode) { + throw new UnsupportedOperationException("Should not be called during view rendering"); + } + // internal helpers private Expression parseFieldExpression(String field, boolean useResultTypeHint) { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java b/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java index 877b641f..0623dac6 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java @@ -150,7 +150,8 @@ public abstract class AbstractBindingModelTests extends TestCase { model.pushNestedPath("nestedBean"); assertEquals("test", model.getFieldValue("datum1")); assertEquals("0", model.getFieldValue("datum2")); - assertEquals(int.class, model.getFieldType("datum2")); + Class clazz = model.getFieldType("datum2"); + assertTrue(int.class.equals(clazz) || Integer.class.equals(clazz)); messages.addMessage(new MessageBuilder().source("nestedBean.datum2").error().defaultText("Error").build()); assertNotNull(model.getFieldErrors("datum2").get(0)); diff --git a/spring-webflow/template.mf b/spring-webflow/template.mf index b1c793ec..c1db8e09 100644 --- a/spring-webflow/template.mf +++ b/spring-webflow/template.mf @@ -5,10 +5,10 @@ Bundle-ManifestVersion: 2 Import-Template: org.springframework.binding.*;version="[2.3.0, 2.4.0)", org.springframework.js.*;version="[2.3.0, 2.4.0)", - org.springframework.*;version="[3.0.5.RELEASE, 3.1.0)", - org.springframework.orm.*;version="[3.0.5.RELEASE, 3.1.0)";resolution:=optional, - org.springframework.transaction.*;version="[3.0.5.RELEASE, 3.1.0)";resolution:=optional, - org.springframework.web.portlet.*;version="[3.0.5.RELEASE, 3.1.0)";resolution:=optional, + org.springframework.*;version="[3.1.0.RELEASE, 3.2.0)", + org.springframework.orm.*;version="[3.1.0.RELEASE, 3.2.0)";resolution:=optional, + org.springframework.transaction.*;version="[3.1.0.RELEASE, 3.2.0)";resolution:=optional, + org.springframework.web.portlet.*;version="[3.1.0.RELEASE, 3.2.0)";resolution:=optional, org.springframework.security.*;version="[3.0.0, 4.0.0)";resolution:=optional, org.apache.commons.logging;version="[1.1.1, 2.0.0)", javax.servlet;version="[2.4.0, 3.0.0)", From ce8a12ad4073128688337235803813136a9d7d78 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 27 Mar 2012 14:09:51 -0400 Subject: [PATCH 19/20] Update repository information in docs --- build-spring-webflow/resources/changelog.txt | 1 + build-spring-webflow/resources/readme.txt | 26 +-- spring-webflow-reference/src/overview.xml | 206 ++++--------------- 3 files changed, 57 insertions(+), 176 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 144e4d9f..21831801 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -4,6 +4,7 @@ http://www.springframework.org/webflow Changes in version 2.3.1.RELEASE ----------------------------------------------- +Upgrade Spring to version 3.1.1 Upgrade JSF Mojarra version to 2.1.7 Modify Jsf2FlowFacesContext.isValidationFailed() to check Web Flow's MessageContext for errors Recognize class-level bean validation messages in BindingResult.getGlobalErrors() diff --git a/build-spring-webflow/resources/readme.txt b/build-spring-webflow/resources/readme.txt index 64587975..340818a5 100644 --- a/build-spring-webflow/resources/readme.txt +++ b/build-spring-webflow/resources/readme.txt @@ -89,8 +89,8 @@ For milestones and snapshots only (and for Ivy dependencies) you'll need to use SpringSource repository. Add the following repository to your Maven pom.xml: - spring-repository - Spring project snapshots, milestones, and releases + springsource-repository + Spring project releases, milestones, and snapshots http://repo.springsource.org/snapshot @@ -126,27 +126,27 @@ If using JSF all you need to include is: To access jars using Ivy, add the following repositories to your Ivy config: - - - + + + - - - + + + Then declare the following dependencies in your ivy.xml: - - - + + + If using JavaServerFaces: - + -For more information see the SpringSource Repository FAQ: +For more information see the reference documentation and the SpringSource Repository FAQ: https://github.com/SpringSource/spring-framework/wiki/SpringSource-repository-FAQ 6. ADDITIONAL RESOURCES diff --git a/spring-webflow-reference/src/overview.xml b/spring-webflow-reference/src/overview.xml index c7c994c3..edad6d6f 100644 --- a/spring-webflow-reference/src/overview.xml +++ b/spring-webflow-reference/src/overview.xml @@ -48,166 +48,97 @@ How to access Web Flow artifacts from Maven Central - Each jar in the Web Flow distribution is available in the Maven Central Repository. + Each jar in the Web Flow distribution is available in the Maven Central Repository. This allows you to easily integrate Web Flow into your application if you are already using Maven as the build system for your web development project. - To access Web Flow jars from Maven Central, declare the following dependency in your pom (also adds "spring-binding", "spring-js", and "spring-js-resources"): + To access Web Flow jars from Maven Central, declare the following dependency in your pom (includes transitive dependencies "spring-binding" and "spring-js"): org.springframework.webflow spring-webflow - 2.3.1.RELEASE + x.y.z.RELEASE ]]> - If using JavaServer Faces, declare the following dependency in your pom (also adds the above dependencies): + If using JavaServer Faces, declare the following dependency in your pom (includes transitive dependencies "spring-binding", "spring-webflow" and "spring-js"): org.springframework.webflow spring-faces - 2.3.1.RELEASE + x.y.z.RELEASE ]]> - - - How to access Web Flow artifacts from the SpringSource Bundle Repository + + + How to access Web Flow artifacts with Ivy - Each jar in the Web Flow distribution is also available in the SpringSource Enterprise Bundle Repository. - Use this repository when you wish to run Spring Web Flow in an OSGi environment such as the SpringSource dm Server. - All jars obtained from the SpringSource Bundle Repository are OSGi-ready. + To access Spring Web Flow jars with Ivy, add the following repositories to your Ivy config: - - Accessing Web Flow bundles with Maven - - To access bundles using Maven, add the following repositories to your Maven pom: - - - com.springsource.repository.bundles.release - SpringSource Enterprise Bundle Repository - SpringSource Releases - http://repository.springsource.com/maven/bundles/release - - - - com.springsource.repository.bundles.external - SpringSource Enterprise Bundle Repository - External Releases - http://repository.springsource.com/maven/bundles/external -]]> - - - Then declare the following dependency: - - - org.springframework.webflow - org.springframework.webflow - 2.3.1.RELEASE -]]> - - - And if using JavaServer Faces: - - - org.springframework.webflow - org.springframework.faces - 2.3.1.RELEASE -]]> - - - Note the Web Flow artifacts in the SpringSource Bundle Repository are indexed under different ids because their transitive dependencies are different than the Maven Central artifacts. - The difference is the transitive jars such as commons-logging have been patched by SpringSource to add the metadata required to make them OSGi-compatible. - - - - Accessing Web Flow bundles with Ivy - - To access bundles using Ivy, add the following repositories to your Ivy config: - + [organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /> + [organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /> ]]> - - Then declare the following dependencies (also adds "org.springframework.binding", - "org.springframework.js", and "org.springframework.spring.js"): - + + To access Spring Web Flow jars as well as 3rd party dependencies with Ivy, add the following repository to your Ivy config: + + + +]]> + + + Then declare the following dependencies in your ivy.xml: + + runtime" /> + ]]> - - - And if using JavaServerFaces: - - runtime" />]]> + + + If using JavaServer Faces, declare the following dependency in your pom (also adds the above dependencies): + + runtime" />]]> - - - - Accessing the dm Server Web Flow library - - A dm Server library for Web Flow is also available if you are deploying to a dm Server environment. - Import this library in your MANIFEST.mf to automatically import all Web Flow bundles. - To access the library, add the following repository: - - - com.springsource.repository.libraries.release - SpringSource Enterprise Bundle Repository - SpringSource Library Releases - http://repository.springsource.com/maven/libraries/release -]]> - - - And declare the following dependency: - - - org.springframework.webflow - org.springframework.webflow-library - libd - 2.3.1.RELEASE -]]> - - + rev="x.y.z.RELEASE" conf="compile->runtime" />]]> + - How to access nightly builds + How to access nightly builds and milestone releases - Nightly snapshots of Web Flow development branches are available using Maven, and distribution zips are also available for download. + Nightly snapshots of Web Flow development branches are available using Maven. These snapshot builds are useful for testing out fixes you depend on in advance of the next release, and provide a convenient way for you to provide feedback about whether a fix meets your needs. - - If using Maven, you may obtain snapshots from either the SpringSource-managed Maven Central-compatible repository or the SpringSource Enterprise Bundle Repository. - Use the Maven Central-compatible snapshot repository when your project obtains its other open source dependencies from Maven Central. - Use the Spring Source Enterprise Bundle Snapshot Repository when you wish to run Web Flow in an OSGi environment. - - Accessing snapshots from the Maven-central compatible repository + Accessing snapshots and milestones with Maven - Add the following repository your pom: + For milestones and snapshots you'll need to use the SpringSource repository. + Add the following repository to your Maven pom.xml: - org.springsource.maven.snapshot - SpringSource Maven Central-compatible Snapshot Repository - http://maven.springframework.org/snapshot + springsource-repository + Spring project snapshots, milestones, and releases + http://repo.springsource.org/snapshot ]]> @@ -243,56 +174,5 @@ ]]> - - Accessing snapshots from the SpringSource Enterprise Bundle Repository - - Add the following repository your pom: - - - com.springsource.repository.bundles.snapshot - SpringSource Enterprise Bundle Snapshot Repository - http://repository.springsource.com/maven/bundles/snapshot -]]> - - - Then declare the following dependencies: - - - org.springframework.webflow - org.springframework.binding - x.y.z.BUILD-SNAPSHOT - - - - org.springframework.webflow - org.springframework.js - x.y.z.BUILD-SNAPSHOT - - - - org.springframework.webflow - org.springframework.webflow - x.y.z.BUILD-SNAPSHOT -]]> - - - And if using JavaServerFaces: - - - org.springframework.webflow - org.springframework.faces - x.y.z.BUILD-SNAPSHOT -]]> - - - - Accessing snapshot distribution archives - - Get the snapshot zip with the most recent CI build number from the Web Flow snapshot download area. - - From bca605d24aaf45876a1c657759831f879b281740 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 27 Mar 2012 15:59:02 -0400 Subject: [PATCH 20/20] Spring Web Flow 2.3.1 release --- build-spring-webflow/resources/changelog.txt | 2 +- build.properties | 3 ++- pom.xml | 2 +- spring-binding/pom.xml | 2 +- spring-faces/pom.xml | 2 +- spring-faces/template.mf | 8 ++++---- spring-js-resources/pom.xml | 2 +- spring-js/pom.xml | 2 +- spring-webflow-samples/booking-faces/.classpath | 7 +------ .../.settings/org.eclipse.wst.common.component | 17 +---------------- spring-webflow-samples/booking-faces/pom.xml | 2 +- spring-webflow-samples/booking-mvc/.classpath | 6 ++---- .../.settings/org.eclipse.wst.common.component | 10 ++-------- spring-webflow-samples/booking-mvc/pom.xml | 2 +- .../booking-portlet-faces/.classpath | 6 +----- .../.settings/org.eclipse.wst.common.component | 14 +------------- .../booking-portlet-faces/pom.xml | 2 +- .../booking-portlet-mvc/.classpath | 7 ++----- .../.settings/org.eclipse.wst.common.component | 13 ++----------- .../booking-portlet-mvc/pom.xml | 2 +- spring-webflow-samples/jsf-booking/pom.xml | 2 +- spring-webflow-samples/pom.xml | 2 +- spring-webflow/pom.xml | 2 +- spring-webflow/template.mf | 4 ++-- 24 files changed, 33 insertions(+), 88 deletions(-) diff --git a/build-spring-webflow/resources/changelog.txt b/build-spring-webflow/resources/changelog.txt index 21831801..d88769b9 100644 --- a/build-spring-webflow/resources/changelog.txt +++ b/build-spring-webflow/resources/changelog.txt @@ -2,7 +2,7 @@ SPRING WEB FLOW CHANGELOG ========================= http://www.springframework.org/webflow -Changes in version 2.3.1.RELEASE +Changes in version 2.3.1.RELEASE (Mar 27, 2012) ----------------------------------------------- Upgrade Spring to version 3.1.1 Upgrade JSF Mojarra version to 2.1.7 diff --git a/build.properties b/build.properties index 491a1169..9dc4f45e 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,6 @@ version=2.3.1 -release.type=integration +release.type=release +build.stamp=RELEASE natural.name=spring-webflow project.key=SWF ivy.cache.dir=${basedir}/../ivy-cache diff --git a/pom.xml b/pom.xml index efa48a66..eb5841fa 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ spring-webflow-root pom Spring Web Flow - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE spring-binding spring-js-resources diff --git a/spring-binding/pom.xml b/spring-binding/pom.xml index 84117737..9c577b24 100644 --- a/spring-binding/pom.xml +++ b/spring-binding/pom.xml @@ -5,7 +5,7 @@ spring-binding jar Spring Binding - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE commons-logging diff --git a/spring-faces/pom.xml b/spring-faces/pom.xml index 3bc7a813..1b6a7f7b 100644 --- a/spring-faces/pom.xml +++ b/spring-faces/pom.xml @@ -5,7 +5,7 @@ spring-faces jar Spring Faces - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE commons-logging diff --git a/spring-faces/template.mf b/spring-faces/template.mf index ffe4944d..a52ec1af 100644 --- a/spring-faces/template.mf +++ b/spring-faces/template.mf @@ -3,11 +3,11 @@ Bundle-Name: Spring Faces Bundle-Vendor: SpringSource Bundle-ManifestVersion: 2 Import-Package: - org.springframework.webflow.engine.builder.support;version="[2.3.0, 2.4.0)" + org.springframework.webflow.engine.builder.support;version="[2.3.1, 2.4.0)" Import-Template: - org.springframework.binding.*;version="[2.3.0, 2.4.0)", - org.springframework.js.*;version="[2.3.0, 2.4.0)", - org.springframework.webflow.*;version="[2.3.0, 2.4.0)", + org.springframework.binding.*;version="[2.3.1, 2.4.0)", + org.springframework.js.*;version="[2.3.1, 2.4.0)", + org.springframework.webflow.*;version="[2.3.1, 2.4.0)", org.springframework.*;version="[3.1.0.RELEASE, 3.2.0)", org.apache.commons.logging;version="[1.1.1, 2.0.0)", javax.el;version="[1.0.0, 2.0.0)", diff --git a/spring-js-resources/pom.xml b/spring-js-resources/pom.xml index cdb6e714..9353abc0 100644 --- a/spring-js-resources/pom.xml +++ b/spring-js-resources/pom.xml @@ -5,7 +5,7 @@ spring-js-resources jar Spring JavaScript Resources - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE diff --git a/spring-js/pom.xml b/spring-js/pom.xml index 817f7ce7..305a2890 100644 --- a/spring-js/pom.xml +++ b/spring-js/pom.xml @@ -5,7 +5,7 @@ spring-js jar Spring JavaScript - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE commons-logging diff --git a/spring-webflow-samples/booking-faces/.classpath b/spring-webflow-samples/booking-faces/.classpath index 4c7c4b07..72637e82 100755 --- a/spring-webflow-samples/booking-faces/.classpath +++ b/spring-webflow-samples/booking-faces/.classpath @@ -17,7 +17,6 @@ - @@ -40,15 +39,12 @@ - - + - - @@ -56,7 +52,6 @@ - diff --git a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component index 0539dc5b..bfd509e9 100755 --- a/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-faces/.settings/org.eclipse.wst.common.component @@ -27,9 +27,6 @@ uses - - uses - uses @@ -96,9 +93,6 @@ uses - - uses - uses @@ -111,18 +105,12 @@ uses - + uses uses - - uses - - - uses - uses @@ -141,9 +129,6 @@ uses - - uses - uses diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml index ea0be316..811c8a8b 100644 --- a/spring-webflow-samples/booking-faces/pom.xml +++ b/spring-webflow-samples/booking-faces/pom.xml @@ -6,7 +6,7 @@ booking-faces war Hotel Booking : Spring MVC + Web Flow + JSF/PrimeFaces - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE 3.1.1.RELEASE 3.0.2.RELEASE diff --git a/spring-webflow-samples/booking-mvc/.classpath b/spring-webflow-samples/booking-mvc/.classpath index d467be58..4237a2d6 100755 --- a/spring-webflow-samples/booking-mvc/.classpath +++ b/spring-webflow-samples/booking-mvc/.classpath @@ -42,14 +42,12 @@ - - - + @@ -59,7 +57,7 @@ - + diff --git a/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component index c77e75d8..54588931 100755 --- a/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-mvc/.settings/org.eclipse.wst.common.component @@ -99,9 +99,6 @@ uses - - uses - uses @@ -117,10 +114,7 @@ uses - - uses - - + uses @@ -147,7 +141,7 @@ uses - + uses diff --git a/spring-webflow-samples/booking-mvc/pom.xml b/spring-webflow-samples/booking-mvc/pom.xml index 5ae82128..9a138146 100644 --- a/spring-webflow-samples/booking-mvc/pom.xml +++ b/spring-webflow-samples/booking-mvc/pom.xml @@ -6,7 +6,7 @@ booking-mvc war Hotel Booking : Spring MVC + Web Flow + JSP - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE 3.1.1.RELEASE 3.0.2.RELEASE diff --git a/spring-webflow-samples/booking-portlet-faces/.classpath b/spring-webflow-samples/booking-portlet-faces/.classpath index 3e68d0aa..65f2e989 100644 --- a/spring-webflow-samples/booking-portlet-faces/.classpath +++ b/spring-webflow-samples/booking-portlet-faces/.classpath @@ -43,20 +43,16 @@ - - + - - - diff --git a/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component index 9b0d5858..77e7e0c5 100644 --- a/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-portlet-faces/.settings/org.eclipse.wst.common.component @@ -102,9 +102,6 @@ uses - - uses - uses @@ -117,18 +114,12 @@ uses - + uses uses - - uses - - - uses - uses @@ -138,9 +129,6 @@ uses - - uses - uses diff --git a/spring-webflow-samples/booking-portlet-faces/pom.xml b/spring-webflow-samples/booking-portlet-faces/pom.xml index 4069efce..9eaf30a5 100644 --- a/spring-webflow-samples/booking-portlet-faces/pom.xml +++ b/spring-webflow-samples/booking-portlet-faces/pom.xml @@ -6,7 +6,7 @@ booking-portlet-faces war Hotel Booking : Spring Portlet MVC + Web Flow + JSF - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE 3.1.1.RELEASE 1.5.10 diff --git a/spring-webflow-samples/booking-portlet-mvc/.classpath b/spring-webflow-samples/booking-portlet-mvc/.classpath index a54663f2..0c4c40f9 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.classpath +++ b/spring-webflow-samples/booking-portlet-mvc/.classpath @@ -17,7 +17,6 @@ - @@ -38,19 +37,17 @@ - - - + - + diff --git a/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component b/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component index d69d96d2..9711e2af 100644 --- a/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component +++ b/spring-webflow-samples/booking-portlet-mvc/.settings/org.eclipse.wst.common.component @@ -21,9 +21,6 @@ uses - - uses - uses @@ -87,9 +84,6 @@ uses - - uses - uses @@ -105,10 +99,7 @@ uses - - uses - - + uses @@ -120,7 +111,7 @@ uses - + uses diff --git a/spring-webflow-samples/booking-portlet-mvc/pom.xml b/spring-webflow-samples/booking-portlet-mvc/pom.xml index 85b03dd4..1be8f437 100644 --- a/spring-webflow-samples/booking-portlet-mvc/pom.xml +++ b/spring-webflow-samples/booking-portlet-mvc/pom.xml @@ -6,7 +6,7 @@ booking-portlet-mvc war Hotel Booking : Spring Portlet MVC + Web Flow + JSP - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE 3.1.1.RELEASE 1.5.10 diff --git a/spring-webflow-samples/jsf-booking/pom.xml b/spring-webflow-samples/jsf-booking/pom.xml index bf204aa9..12704387 100644 --- a/spring-webflow-samples/jsf-booking/pom.xml +++ b/spring-webflow-samples/jsf-booking/pom.xml @@ -6,7 +6,7 @@ jsf-booking war Hotel Booking : Spring Framework + JSF - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE 3.1.1.RELEASE 1.5.10 diff --git a/spring-webflow-samples/pom.xml b/spring-webflow-samples/pom.xml index adf3a3ff..c03f56c3 100644 --- a/spring-webflow-samples/pom.xml +++ b/spring-webflow-samples/pom.xml @@ -6,7 +6,7 @@ spring-webflow-samples pom Spring Web Flow Samples - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE booking-mvc booking-faces diff --git a/spring-webflow/pom.xml b/spring-webflow/pom.xml index 5dcf7c19..2e2c55c9 100644 --- a/spring-webflow/pom.xml +++ b/spring-webflow/pom.xml @@ -5,7 +5,7 @@ spring-webflow jar Spring Web Flow - 2.3.1.BUILD-SNAPSHOT + 2.3.1.RELEASE commons-logging diff --git a/spring-webflow/template.mf b/spring-webflow/template.mf index c1db8e09..b59719b4 100644 --- a/spring-webflow/template.mf +++ b/spring-webflow/template.mf @@ -3,8 +3,8 @@ Bundle-Name: Spring Web Flow Bundle-Vendor: SpringSource Bundle-ManifestVersion: 2 Import-Template: - org.springframework.binding.*;version="[2.3.0, 2.4.0)", - org.springframework.js.*;version="[2.3.0, 2.4.0)", + org.springframework.binding.*;version="[2.3.1, 2.4.0)", + org.springframework.js.*;version="[2.3.1, 2.4.0)", org.springframework.*;version="[3.1.0.RELEASE, 3.2.0)", org.springframework.orm.*;version="[3.1.0.RELEASE, 3.2.0)";resolution:=optional, org.springframework.transaction.*;version="[3.1.0.RELEASE, 3.2.0)";resolution:=optional,