You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Donald Dwoske <dd...@genomecorp.com> on 2002/07/02 23:27:08 UTC
removing parameters from forward
Quick version: I have a hidden field named 'action' on
my form, and when I forward to another action, I want
that field, plus all the others to be reset. Is there
a way to erase all the parameters in a request before
returning a new ActionForward?
Long version:
I have a situation where I am on one jsp form which has
a hidden field called "action", this field is
tells lots of my Actions what to do when the form is submitted,
thus many form beans have this same property.
I have a link from that Action which can go to a
different Action and I need to return to the first action when
done with the second.
So my link looks sort of like this:
addDefaults.do?returnUrl=/editWorkrequest.do
When addDefaults is done, I can go back to editWorkRequest.
This allows me to use addDefaults in many different sub-workflows
and go back to whatever called it.
So when my sub-task changes the 'action' field, it messes up
the 'action' field in my editWorkRequest when I go back there.
I have all the original information I need for editWorkrequest.do
still in my session, so I just want a fresh request... any way
to erase what's in the request, or reset that 'action' field to
something else?
-Don
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: removing parameters from forward
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
I always check for that parameter in the request attributes first, and
if I don't find it there, then I check in the request parameters.
Donald Dwoske wrote:
> Quick version: I have a hidden field named 'action' on
> my form, and when I forward to another action, I want
> that field, plus all the others to be reset. Is there
> a way to erase all the parameters in a request before
> returning a new ActionForward?
>
> Long version:
>
> I have a situation where I am on one jsp form which has
> a hidden field called "action", this field is
> tells lots of my Actions what to do when the form is submitted,
> thus many form beans have this same property.
>
> I have a link from that Action which can go to a
> different Action and I need to return to the first action when
> done with the second.
>
> So my link looks sort of like this:
>
> addDefaults.do?returnUrl=/editWorkrequest.do
>
> When addDefaults is done, I can go back to editWorkRequest.
> This allows me to use addDefaults in many different sub-workflows
> and go back to whatever called it.
>
> So when my sub-task changes the 'action' field, it messes up
> the 'action' field in my editWorkRequest when I go back there.
>
> I have all the original information I need for editWorkrequest.do
> still in my session, so I just want a fresh request... any way
> to erase what's in the request, or reset that 'action' field to
> something else?
>
> -Don
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>