Hi Andy,

how exactly did you do that?

Many thanks in advance
twr

-----Original Message-----
>From : Andy Noble <[EMAIL PROTECTED]>
To : Struts Users Mailing List <[EMAIL PROTECTED]>
Date : 14 November 2001 17:35:49
Subject : Re: request scope and forms
I had this very problem. You want the best of both worlds like I did - the>formbean 
somehow lives between two requests but doesn't clog up memory like
>a session bean could. I chose the request only option in the end. All the
>data in the bean gets sent to the client, and a new formbean is created and
>populated when that form is reposted by the user. In effect, the lifetime of
>the data is held with the client, rather than the server. The processing
>cost in terms of creating new formbeans and repopulating them with HTML data
>is negligible compared with the potential for session beans to clog up the
>system holding data that may never be reused.
>
>Andy
>
>----- Original Message -----
>From: Rob Breeds <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Sent: Wednesday, November 14, 2001 5:12 PM
>Subject: RE: request scope and forms
>
>
>> Robert
>>
>> OK, so even if I forward to a JSP with a form bean in the request, and the
>> JSP displays data from that form bean, as soon as I submit the form again,
>> the original form bean is lost. Hmmm, I was hoping I could somehow keep
>the
>> forward chain going and Struts would magically keep my ActionForm alive.
>>
>> Thanks
>>
>> Rob
>>
>>
>>
>>
>>
>>                     “Robert
>>                     Nocera“              To:     “'Struts Users Mailing
>List'“ <[EMAIL PROTECTED]>
>>                     <rnocera@neosl       cc:
>>                     lc.com>              Subject:     RE: request scope
>and forms
>>
>>                     14/11/2001
>>                     16:19
>>                     Please respond
>>                     to “Struts
>>                     Users Mailing
>>                     List“
>>
>>
>>
>>
>>
>>
>> If I understood your question correction, you probably want to use a
>> session scope bean.  In your case when the JSP is submitted each time a
>> new form bean is created because at that point it is a new request, not
>> a forward.
>>
>> Robert Nocera
>> New England Open Solutions
>> www.neosllc.com
>> “You supply the vision, we'll do the rest.“
>>
>>
>> -----Original Message-----
>> From: Rob Breeds [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, November 14, 2001 11:03 AM
>> To: Struts Users Mailing List
>> Subject: request scope and forms
>>
>>
>> I'm getting stuck with request scope and ActionForm objects not sticking
>> around across requests.
>>
>> If I have a jsp that has an input text field called name that populates
>> a
>> corresponding field in an ActionForm called name, then that field gets
>> populated.
>>
>> If the Action associated with this ActionForm then takes that name value
>> and adds it a different property in the ActionForm (say to a Vector) and
>> then forwards to the SAME input jsp again, why is it that a new
>> ActionForm
>> object is instantiated every time (according to the log), such that
>> theActionForm never gets more than one String added to the Vector?
>>
>> I was under the impression that if I forwarded, any ActionForm passed to
>> the Action would be persisted in the request.
>>
>> Thanks
>>
>> Rob Breeds
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>>
>>
>> --
>> To unsubscribe, e-mail:   <
>> mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: <
>> mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>

>:-) As sceptical as one can be! (-:<



----------
Get a free, personalised email address at http://another.com
TXT ALRT! Stop wasting money now. Send FREE, personalised txt
from http://another.com
--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to