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() {