My angle on this is to only load the data from the database when the user is
submitted a request to "read" data.  If they are submitting an "update"
action, I don't load the data from the database.
 
-----Original Message-----
From: Matt E [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 12:37 PM
To: [EMAIL PROTECTED]
Subject: Form Bean Help?

Hello All,

I'm running into a little problem, maybe someone can
help me fix it.

My application is driven by filling out web forms.  At
one point, A user can click the "Save Form" button,
which writes the form information to a Database.  When
the user visits the page again, the action builds a
DTO that contains all the information they had filled
out and puts it in the session scope, then forwards to
the JSP page that has the form on it.

I had been using the value property of the struts-html
tags to fill in the data, but I've noticed that when
the user hits submit, if there is a validation error,
they are pushed back to the page, and the data they
had enetered is replaced with what was in the DTO
(which is now old data).  I've also run into the
problem of filling in things like radio buttons, based
on what was in the DTO.

It seems to me that what I want to do is not pass
along the DTO with the action, but fill out parts of
the Form Bean before forwarding to the page that
displays it, at which point I could remove the value
properties of the html tags, and have everything work.

My question is, how can I do this from the action?  Or
do I want to attack this problem in another way?

Thanks!

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.



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

Reply via email to