don't forget that the properties on the beans will only be transferred where their names are the same.

Funny how the same question from different people often appears within 48 hours 8-o

Mainguy, Mike wrote:
public ActionForward execute(
        ActionMapping mapping,
        ActionForm form,
        HttpServletRequest request,
        HttpServletResponse response)
        throws Exception {
        MyDynaValidatorActionForm ourForm = (MyDynaValidatorActionForm)
form;

...
  Do all our magic to get the data into something called torqueBean
...


BeanUtils.copyProperties(ourForm, torqueBean);
return mapping.findForward("display");
}


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 4:43 PM
To: Struts Users Mailing List
Subject: Pre-populating forms dynamically





When passing data back from persistence layer, what are the options for
prepopulating a form.

Can i prepopulate forms if using DynaValidatorForm?

Do I just populate an ActionForm in an Action and pass that back to the

form


jsp? Or if I do this is a new instance of the form created when the form

is


created? It doesn't seem to work but may be an error somewhere else?

Is anyone using the prepopulate using the reset method, as they explain in
the Struts, OJB, Velocity.... book but with dynamic values rather than
pulling static values from the message resources.

Have been stuck on this for a few days and would appreciate any help.

Ross





---------------------------------------------------------------------
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]



-- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9


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



Reply via email to