> From: Jim Kennedy [mailto:[EMAIL PROTECTED] > The values to prepopulate the form are in a bean. However, > value="${user.firstName}" inside my <html-el:text> tag does > not allow newly entered values to stick.
I think the struts-example webapp has an example of using BeanUtils.copyProperties to copy values from a bean into the form. Search the archives for 'prepopulate' and you should find some examples. In a nutshell, you need to set the properties of the form bean before you forward to the JSP, (then avoid setting them again when the form is submitted, otherwise you'll overwrite the user input). I have this... private void prepopulateForm( ... ) { // copy properties from the DTO to the form if ( form != null && contact != null ) { DynaActionForm dvForm = (DynaActionForm) form; BeanUtils.copyProperties( dvForm, contact ); //manually deal with prospectName since it's called prospectNameOrId on the form dvForm.set( "prospectNameOrId", contact.getProspectName() ); } } -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]