You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Finlay <po...@yahoo.com> on 2002/08/19 00:28:48 UTC

Re: Populating dynamic form beans

Drew McAuliffe wrote:
> 
> Is there a simple way to populate a dynamic form
bean with an object
> whose properties match the names of the configured
fields in the form?

I have not seen any reply to this question and I have
the same related
issue.

Scenario is as follows:

The same DynaValidatorForm is used both for creating
and editing 
the data associated with a user account. 

For the creation action, nothing special needs to be
done to the
form since it simply needs to start empty.

For the edit action, the form first needs to be
populated with the data
that already exists for the account to be edited.

I thought that the edit action could simply
call     PropertyUtils.copyProperties(form, account)
to populate the DynaValidatorForm prior to forwarding
to the JSP page.

This unfortunately does not work. What's the proper
way to do this?
 
Thanks.

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>