On May 5, 2004, at 2:19 PM, David Demner wrote:
Hi Stephane,
Interesting... How do you get this work 'elegantly' in turbine? Right now,
my data entry forms are processed by Actions, but when I use setTemplate
from within the action, I get to the presentation page I want, but when I
click on Refresh it asks to resending the data. How are you doing this?
On our project we have a single action base class (that extends velocity action) that is responsible for handling the redirect. The trick is that the "action" argument is not passed via $link.setAction(). Rather, we include it as a hidden field in form itself. Then, the action attribute of the <form> tag is just the next screen in the flow with no action specifiers. On the back end, we use the request header (data.getRequest()) to get the requested url (which the browser puts into the HTTP request header) and we redirect to that page upon successful completion of the form processing. Our actions don't know the difference. The only time this gets tricky is when then next page of your flow requires parameters that weren't known until completed the action on the back end. In this case, you have to add those additional parameters to the requested url at the end of the action and send the redirect via data.setRedirectURI().
-Brian
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
