Restoring the following code is sufficient to fix the integration with Spring Web Flow 2 as tested by the swf-booking-icefaces example. The actual fix remains to be determined; for instance, why does the current state saving implementation not suffice for SWF and why does SWF require the "extra" BridgeExternalContext.release() call? (The "extra" release call is likely required because of the differences introduced by the SWF2 external lifecycle.)
— src/com/icesoft/faces/application/D2DViewHandler.java (revision 17947)
+++ src/com/icesoft/faces/application/D2DViewHandler.java (working copy)
@@ -159,11 +159,11 @@
}
renderResponse(context);
-// if ( CoreUtils.isJSFStateSaving() ) {
-// StateManager stateMgr = context.getApplication().getStateManager();
-// stateMgr.saveSerializedView(context);
+ if ( CoreUtils.isJSFStateSaving() )
{
+ StateManager stateMgr = context.getApplication().getStateManager();
+ stateMgr.saveSerializedView(context);
// JSF 1.1 removes transient components here, but I don't think that 1.2 does
-// }
+ }
}
Index: src/com/icesoft/faces/context/View.java
===================================================================
— src/com/icesoft/faces/context/View.java (revision 17947)
+++ src/com/icesoft/faces/context/View.java (working copy)
@@ -153,6 +153,7 @@
private void releaseAll()
{
facesContext.release();
persistentFacesState.release();
+ ((com.icesoft.faces.context.BridgeExternalContext)facesContext.getExternalContext()).release();
}
public BridgeFacesContext getFacesContext() {
This problem is confirmed specifically for Spring Web Flow and appears to have been present early in the 1.8 cycle.
The root cause is the interaction of the Extended Request Scope lifetime and the ExternalContext.release(). SWF causes release() to be called many times during a single JSF lifecycle (since it manages the lifecycle externally) so we suppress request map clearing for SWF. Unfortunately, this means that the request map is never cleared in the case of SWF.