I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my flows does have a page that must trigger a form submit at certain events. For each different action, a different view must be presented. So, I’m trying to activate the following javascript code to perform the submission:
function myFormSubmit( eventId ) { var formAction = document.myForm.action; document.myForm.action = formAction + '&_eventId=' + eventId; document.myForm.submit(); }
Unfortunatelly, this doesn’t triggers the requested transition in my flow. The page doesn’t change. Does anyone knows how to deal with this?
Thanks, Alexandre
I’ve got the solution in the Spring WebFlow forum. According to Jeremy Grelle, the submission of ‘_eventId’ parameter does not trigger transitions when integrating Spring WebFlow to JSF. The solution he gave was to create a JSF PhaseListener that creates a JSF action when an ‘_eventId’ parameter is sent.
The phaseListener code can be seen at http://forum.springsource.org/showthread.php?p=219358#post219358.