Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8RC1
-
Component/s: Framework
-
Labels:None
-
Environment:Spring Webflow 2.0.5 + ICEFaces 1.8
-
ICEsoft Forum Reference:
Description
Code that works in Webflow 2.0.3 no longer works in 2.0.5
Activity
Greg Dick
created issue -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18596 | Tue Mar 17 16:25:45 MDT 2009 | greg.dick | |
Files Changed | ||||
MODIFY
/projects/swf-booking-icefaces/trunk/swf-booking-icefaces/src/main/webapp/WEB-INF/faces-config.xml
|
Greg Dick
made changes -
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 1.8 [ 10161 ] | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 1.8RC2 [ 10163 ] | |
Fix Version/s | 1.8 [ 10161 ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #19266 | Wed Sep 16 16:15:02 MDT 2009 | ted.goddard | use defaults for dependency configuration ( |
Files Changed | ||||
MODIFY
/projects/swf-booking-icefaces/trunk/swf-booking-icefaces/ivy.xml
|
This turns out to be another problem with delegation support. There is a little section of code in the SpringFlowStateManager that decides if the view is restorable or not:
protected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId) {
{ return super.restoreTreeStructure(context, viewId, renderKitId); }if (!JsfUtils.isFlowRequest())
RequestContext requestContext = RequestContextHolder.getRequestContext();
{ <--------------------------- (1) logger.debug("No matching view in view scope"); return null; }SerializedView view = (SerializedView) requestContext.getViewScope().get(SERIALIZED_VIEW_STATE);
if (view == null || !view.viewId.equals(viewId))
The view.viewIdWith ICEFaces + webflow 2.0.3, the viewId is pre-constructed to contain the path to the resource. An example viewId in the ICEFaces Booking example is "/WEB-INF/flows/enterSearchCriteria.xhtml"
In Spring 2.0.5, the path is not added as part of the Flow startup and instead the FlowViewHandler does a little bit of work to flesh out the path information using a resource loader. This code is not present in 2.0.3. The FlowViewHandler is likely loaded from the faces-config.xml as ours is, but it ls loaded before ours. Since our ViewHandler doesn't delegate the code to fill out the path in the viewId is never executed. Hence the flow is continuously restarted.
A workaround is to define a Spring FlowViewHandler in the application faces-config.xml file. This has certain disadvantages like causing a duplicate FlowViewHandler instance to be created.
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
<view-handler>
com.icesoft.faces.facelets.D2DFaceletViewHandler
</view-handler>
<!--#4200 define another Spring ViewHandler -->
<view-handler>
org.springframework.faces.webflow.FlowViewHandler
</view-handler>
<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
</application>