Re: What Are Doing with DynaActionForm

2002-11-04 Thread Mark Ayad
Rick I read your email and had an Ahh Moment ! Thats quite elegent and now
less lines of code to maintain. Are there any caveats to doing this.

I guess you are doing this post validation.

Mark

- Original Message -
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 12:02 AM
Subject: Re: What Are Doing with DynaActionForm


>
>
> On Monday, November 4, 2002, 5:53:52 PM, Mark wrote:
>
>
> MA> What are other people using to extract and map data out of the
DynaActionForm ?
>
> I use BeanUtils.copyProperties(..) to copy the properties from my
> DynaActionForm into my Model layer bean.  In the action just do:
>
> BeanUtils.copyProperties( yourModelLayerBean, yourDynaActionForm );
>
> (For dealing with java.util.Date I had to create Converter that
> you just register with BeanUtils. If you are using Dates I can
> send it to you or check the archives here).
>
> --
>
> Rick
> mailto:maillist@;reumann.net
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: What Are Doing with DynaActionForm

2002-11-04 Thread Rick Reumann


On Monday, November 4, 2002, 5:53:52 PM, Mark wrote:


MA> What are other people using to extract and map data out of the DynaActionForm ?

I use BeanUtils.copyProperties(..) to copy the properties from my
DynaActionForm into my Model layer bean.  In the action just do:

BeanUtils.copyProperties( yourModelLayerBean, yourDynaActionForm );

(For dealing with java.util.Date I had to create Converter that
you just register with BeanUtils. If you are using Dates I can
send it to you or check the archives here).

-- 

Rick
mailto:maillist@;reumann.net


--
To unsubscribe, e-mail:   
For additional commands, e-mail: