You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Roland Chan <rc...@casebank.com> on 2002/05/08 19:51:21 UTC

PropertyUtils.copyProperties

Can anyone show a good example of how to use the commons
PropertyUtils.copyProperties when the types of your Origin (Struts
Action Form) and Destination (Value Object) are not the same?  Is there
a prescribed way to do this?  I've been searching and have yet to find
anything.  It doesn't help that mail-archive is down either.
 
Thanks,
Roll
 

Re: PropertyUtils.copyProperties

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 8 May 2002, Roland Chan wrote:

> Date: Wed, 8 May 2002 13:51:21 -0400
> From: Roland Chan <rc...@casebank.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: commons-dev@jakarta.apache.org
> Subject: PropertyUtils.copyProperties
>
> Can anyone show a good example of how to use the commons
> PropertyUtils.copyProperties when the types of your Origin (Struts
> Action Form) and Destination (Value Object) are not the same?  Is there
> a prescribed way to do this?  I've been searching and have yet to find
> anything.  It doesn't help that mail-archive is down either.
>

You are correct in noting that copyProperties() doesn't do any
conversions, and there isn't any standard mechanism that does both
converting and copying.  Perhaps we ought to add a convertProperties()
method that is just like copyProperties but uses ConvertUtils on each
property as needed.

> Thanks,
> Roll
>
>

Craig



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