Craig,
 
Thanks!
 
Mark

>>> [EMAIL PROTECTED] 08/13/01 07:03PM >>>


On Mon, 13 Aug 2001, Mark Chen wrote:

> I remembered that I read some article about separating business object
> from ActionForm using Some kind of util class built from Struts to
> extract info from business object or value object.
>
> Unfortunately, I couldn't locate the document. Any help will be
> greatly appreciated!
>
>

You might want to look at PropertyUtils.copyProperties().  This is what
Struts uses deep inside when populating the properties of your form beans,
but the methods are equally useful to your own code.

In Struts 1.0, this class is in package "org.apache.struts.util".  In
1.1-dev, the classes got moved to the Jakarta Commons project
<http://jakarta.apache.org/commons/> because they are generally useful
outside of Struts as well.  The only thing you do to use these is change
the package name to "org.apache.commons.beanutils" instead -- calling
sequences are compatible.

>
> Mark Chen
>
> Montage.DMC, AT&T Canada,
>

Craig


Reply via email to