Whoops, I completely missed that, Red Herring alert! -----Original Message----- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 12:56 PM To: 'Struts Users Mailing List' Subject: RE: Form Bean Help?
Matt wrote: > 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). Don't use the 'value' attribute, just let Struts render the HTML form elements based on what's stored in the Form bean. That will fix the redisplay on validation problem. If you need to pre-populate the form, read the DTO from the database and use BeanUtils.copyProperties(...) to copy the DTO values into the Form bean before forwarding to the view. Take a look at the struts-example webapp, it works the way you're describing. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM 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]