I've tried to patch ICEfaces 1.7.2 too....And hazzah, it is working, meaning that we're now running ICEfaces 1.7.2 and Spring Web Flow 2.0.3 together on a WebSphere Portal Server 6.0 (and WebSphere Application Server 6.0 for that matter).
I've included the changed (and new) files in the attached zip file.
MainPortlet, FacesContextFactoryImpl and Constants are patched the same way as the ones I patched for version 1.7.1. The SwfLifecycleExecutor however, took some more work. The reason being that some code where introduced in the SwfLifecycleExecutor class to handle the result of executing a Spring Web Flow. This new code was quite servlet orientated with a lot of HttpPServletRequests and HttpServletResponses flying through the air.
Therefore I made a new interface called FlowExecutionHandler, with a method called handleFlowExecutionResult(). This method then takes care of handling the Spring Web Flow execution result. Furthermore I created two new classes, called ServletFlowExecutionHandler and PortletFlowExecutionHandler which both implements the FlowExecutionHandler interface. Most of the "new" (introduced in 1.7.2) code in SwfLifecycleExecutor, used for handling the SWF result, was then moved to the ServletFlowExecutionHandler class. The PortletFlowExecutionHandler does not do an awfull lot at the moment. Mainly because, to be quite honest, I don't know exactly what it is supposed to do. Help on this will be most appreciated ![](/images/icons/emoticons/smile.gif)
Next up, I created a FlowExecutionHandlerFactory which, given an external context of type org.springframework.webflow.context.ExternalContext, returns the correct FlowExecutionHandler (Servlet or Portlet). This factory is then used in SwfLifecycleExecutor to retrieve the correct FlowExecutionHandler, which is then used to handle the flow execution result.
Finally, I cleaned up the code in SwfLifecycleExecutor a bit, as the apply() method had grown quite long after my fiddlin' around.
Maybe this solution is over engineered, but feel free to use which parts of it you want. And as I said, any help (or just hints) on the PortletFlowExecutionHandler is very welcome.
These are the files that I've altered:
FacesContextFactoryImp
SwfLifecycleExecutor
MainPortlet
Constants
and then an example of the portlet.xml file (with an added parameter to get the flow id)