You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kevin HaleBoyes <kz...@yahoo.com> on 2002/12/04 00:20:03 UTC
question about findForward()
I'm having trouble explaining what I want but I'll have a go
of it anyway...
I'm in a "Save" action as a result of the POSTing of a form
via a <html:cancel> button. I do the test:
if (isCancelled(request)) {}
and detect the cancel. I'd like to go to another Action but
I don't want to "propagate" the POST. I want it to be a GET
where the input ActionForm is empty.
I'm calling
ActionForward forward = mapping.findForward(forwardName);
return forward;
to go to the new action but it propagates the POST.
Is there anyway turn the POST into a GET?
Should I just call form.reset() manually?
I hope this makes sense.
Kevin.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: question about findForward()
Posted by Kevin HaleBoyes <kz...@yahoo.com>.
--- Emmanuel Boudrant <b7...@yahoo.fr> wrote:
>
> You need a redirection. In a redirection, the request (who
> containt the form) is not propagate. Just put in forward
> declaration :
> <forward name="toto" path="/path_to_toto.jsp" redirect="true"/>
> If your form is stored in session scope, you need to call reset();
> -emmanuel
and
--- "Karr, David" <da...@attws.com> wrote:
> Do you just mean you want to do a redirect? If so, you can do this
> without changing your code, just change the forward definition (in
> your
> action, or global) to have 'redirect="true"'.
>
Thank you both.
The strange thing is, I tried the redirect attribute before I posted
my question last night. I must have done something wrong because
I tried it again this morning after seeing your responses and it
works just as you said. As a note, it seems to work the same
whether I reset() the form or not (it is in session scope).
Emmanuel, why do you say that I need to call reset()?
Thanks again,
Kevin
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: question about findForward()
Posted by Emmanuel Boudrant <b7...@yahoo.fr>.
You need a redirection. In a redirection, the request (who containt the form) is not propagate. Just put in forward declaration :
<forward name="toto" path="/path_to_toto.jsp" redirect="true"/>
If your form is stored in session scope, you need to call reset();
-emmanuel
Kevin HaleBoyes <kzboyes@yahoo.com> a écrit : I'm having trouble explaining what I want but I'll have a go
of it anyway...
I'm in a "Save" action as a result of the POSTing of a form
via a button. I do the test:
if (isCancelled(request)) {}
and detect the cancel. I'd like to go to another Action but
I don't want to "propagate" the POST. I want it to be a GET
where the input ActionForm is empty.
I'm calling
ActionForward forward = mapping.findForward(forwardName);
return forward;
to go to the new action but it propagates the POST.
Is there anyway turn the POST into a GET?
Should I just call form.reset() manually?
I hope this makes sense.
Kevin.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail:
For additional commands, e-mail:
---------------------------------
Soyez solidaire soutenez laction du Téléthon avec Yahoo! France.
Cliquez ici pour faire un don !