You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tuomo Syvänperä <tu...@kolumbus.fi> on 2001/12/12 10:46:55 UTC
Alternate form action
Hi,
How can I return to correct page after submitting a form which can be
called from
several places..
What I have is a action&form which can be accessed from many different
places.
ie. I have page A with a link:
<html:link page="/editArticle.do?action=Edit" paramId="id"
paramName="article" paramProperty="id"><bean:message
key="global.edit"/></html:link>
and page B with the same link. When the user posts the form, I'd like to
return to
the page from which we came from.
Problem is that I cannot tell what possible request parameters or
attributes the original
page had gotten before the call to editArticle.
Currently only solution I came up with was to set attributes to servlet
context, which
contain the page to which we should return and all it's request
parameters. And then when
I populate the editArticle form, I add all these attributes as hidden
fields to the form.
After the form has been submitted the SaveArticleAction saves the form
data and
redirects back to the original calling page..
I hope my explanation was unclear enough :)
Thx.
Tuomo
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>