On Sun, 10 Feb 2002, Kasinath wrote:

> Date: Sun, 10 Feb 2002 16:03:19 -0000
> From: Kasinath <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>      Kasinath <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: How ActionForm Populate Form Variables
>
> Hi All,
>
> Can any one explain how the instance variable of ActionForm get
> instantiated with posted form values. For examples I have written a
> LogonForm extending ActionForm which has two variables username and
> password.In this regard how action servlet will populate the instance
> variable of LogonForm.
>

Others have described how you configure this to make it happen.  You might
also be interested in the actual code that is used -- it's in the
processPopulate() method of ActionServlet (Struts 1.0) or RequestProcessor
(Struts 1.1).  Basically, Struts creates a Map of all the request
parameters, and passes it to the BeanUtils.populate() method which uses
Java reflection to call the setter methods for each of the properties.

> Thanks,
>
> Ravi
>

Craig



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

Reply via email to