You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jonathan <ja...@i-2000.com> on 2001/06/07 20:11:06 UTC

Re: FW: Scope of the form - TED

Ted, I have been questioning the value of the input property.  The input
property in Joyce's case is literally the submitting page, which I hardcoded
into the struts-config.xml.  If I came from another page, however, I will
STILL be forwarded to the uri of the input property.  I believe this is not
the behavior we want.  I believe what we want is to simply return where we
submitted, right?  There was a thread about this before I think.  Can you
shed some light on this?


----- Original Message -----
From: "Ted Husted" <hu...@apache.org>
To: <st...@jakarta.apache.org>
Sent: Thursday, June 07, 2001 1:41 PM
Subject: Re: FW: Scope of the form


> 1. Yes. Using the standard forward or redirect Servlet services.
> 2. It is forwarded to the JSP or Action specified by the input property.
> 3. The form is disposed when the request is disposed, which would happen
> after the JSP was rendered.
>
> > Joyce Tang wrote:
> >
> >
> >
> > -----Original Message-----
> > From: Joyce Tang
> > To: 'struts-user@jakarta.apache.org'
> > Sent: 6/7/01 9:28 AM
> > Subject: Scope of the form
> >
> > I would like to verify my understanding on this thing.  Please let me
> > know if it is correct.  Thank you very much in advance.
> >
> > 1. Whenever the Action do a forward, the request is being forwarded.
> > 2. When the error happens, the request is forwarded back to the same
> > JSP
> > 3. If I define the scope of the form related to the Action class as
> > "request", then before the JSP page is rendered, the form is still in
> > the request, but after the JSP page is rendered,the form is taken out
> > from the request?
> >
> > Thanks a ton.
> >
> > Joyce
>


Re: FW: Scope of the form - TED

Posted by Ted Husted <hu...@apache.org>.
I don't believe that there is a reliable way for Struts to determine
dynamically where a submit actually started, since things can get passed
around. There is history information in the request, but that can be
iffy.

If you want that behaviour, you should be able to script that through
the ActionMappings file by having an entry for each possible input page
with its own input property. The action locations are virtual, and you
can have as many as you need.

Jonathan wrote:
> 
> Ted, I have been questioning the value of the input property.  The input
> property in Joyce's case is literally the submitting page, which I hardcoded
> into the struts-config.xml.  If I came from another page, however, I will
> STILL be forwarded to the uri of the input property.  I believe this is not
> the behavior we want.  I believe what we want is to simply return where we
> submitted, right?  There was a thread about this before I think.  Can you
> shed some light on this?