Joshua,

The reset method is called BEFORE the form bean is populated from the
request.  Therefore, it is not possible to lose any data from the user's
form post.  So, the basic flow is: create or reuse Form bean > reset >
populate > validate > Action perform or execute > return forward.

Tai

-----Original Message-----
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 10:17 AM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: Beginner question


This suggestion brings up another question.  To properly set my boolean
values (radio buttons), my reset method sets my booleans to false.

If I leave my form in session, doesn't the controller call the reset method
after every after every request?  If my booleans equal "true", by the time I
get to my "viewIt" action, won't they be reset to false?








-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 8:07 AM
To: [EMAIL PROTECTED]
Subject: RE: Beginner question


Have you tried putting itemId into session context instead of request
context?

 
  _____  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _____  



-----Original Message-----
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:00 PM
To: Struts Users Mailing List
Subject: Beginner question


I have two struts actions:

        "insertIt" - adds an item to the database.  When successful, this
action forwards to the "viewIt" action putting the newly inserted items
itemId into the request.
        "viewIt" - views an item by itemId (retrieves itemId from request)

When "insertIt" successfully completes, It forwards to "viewIt" without a
redirect.  As many of you know, if the user then refreshes the page, the
insert action is performed again.

To solve this problem, I changed the redirect attribute to "true".  The
refresh problem disappears.  However, the request variable "itemId" gets
lost because of the redirect.  

I know this is something every struts developer has worked through.  Could
someone suggest a pattern for this type of transaction?  

Regards,

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to