spring-webflow
spring-webflow copied to clipboard
f:viewParam not working with Spring Web Flow [SWF-1564]
Nils Eckert opened SWF-1564 and commented
When adding Spring Web Flow to a project, f:viewParam tags are not working any more.
With some debugging I found the following root cause.
The Class org.springframework.faces.webflow.Jsf2FlowViewHandler delegates (in my case) to com.sun.faces.application.view.MultiViewHandler.
But the following method is not delegated: String deriveLogicalViewId(FacesContext context, String rawViewId)
When viewHandler.deriveLogicalViewId(..) is used, the default method from the abstract class javax.faces.application.ViewHandler is called. This method just returns the entered paramater rawViewId. So the correct viewId is not determinded.
In the end, the the viewId is not derive and a JspViewHandlingStrategy is used instead of the expected com.sun.faces.application.view.FaceletViewHandlingStrategy, the f:viewParam tags will not be processed.
To fix the problem, it is nesessary to also delegate deriveLogicalViewId.
I attached to corresonding patch.
Regards, Nils Eckert
Affects: 2.3.1
Attachments:
- spring-webflow.patch (675 bytes)
Nils Eckert commented
Similar problem in an other project:
http://java.net/jira/browse/GLASSFISH-16111?focusedCommentId=310998&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_310998
Phil Webb commented
Hi Nils,
Thanks for the bug report and the patch.
Starting with Web Flow 2.4 we are planning to drop JSF 1.2 support and as a result many of these Jsf2xxx classes have been replaced. IT would be helpful if you could try the latest 2.4.0.BUILD-SNAPSHOT
of the project to see if the issue still exists. If you are using maven the Spring snapshot repository can be found at http://repo.springsource.org/snapshot.
Cheers, Phil.
I assume this ticket can be closed after 10 years.