You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by walkrustin <wa...@yahoo.com> on 2004/04/05 18:37:23 UTC
Creating value objects using reflection class
Hi,
After receiving the form, I have to copy the value of each field to a
value object. I wrote a small reflection utility class to server the
purpose. Now I need more functionalities to that utility class.
I was wondering if there is any utility package already out there
which helps copy the contents from one object to another using
reflection.
thanks.
- walk rustin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Creating value objects using reflection class
Posted by "Craig R. McClanahan" <cr...@apache.org>.
walkrustin wrote:
>Hi,
>
>After receiving the form, I have to copy the value of each field to a
>value object. I wrote a small reflection utility class to server the
>purpose. Now I need more functionalities to that utility class.
>
>I was wondering if there is any utility package already out there
>which helps copy the contents from one object to another using
>reflection.
>
>
Struts itself uses commons-beanutils for exactly this use case.
http://jakarta.apache.org/commons/beanutils/
>thanks.
>- walk rustin
>
>
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Creating value objects using reflection class
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Commons beanutils - struts uses it already - there is a copyProperties()
method
org.apache.commons.beanutils.BeanUtils
http://jakarta.apache.org/commons/beanutils/
----- Original Message -----
From: "walkrustin" <wa...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Monday, April 05, 2004 5:37 PM
Subject: Creating value objects using reflection class
> Hi,
>
> After receiving the form, I have to copy the value of each field to a
> value object. I wrote a small reflection utility class to server the
> purpose. Now I need more functionalities to that utility class.
>
> I was wondering if there is any utility package already out there
> which helps copy the contents from one object to another using
> reflection.
>
> thanks.
> - walk rustin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Creating value objects using reflection class
Posted by Robert Taylor <rt...@mulework.com>.
org.apache.commons.beanutils.*
robert
> -----Original Message-----
> From: walkrustin [mailto:walkrustin@yahoo.com]
> Sent: Monday, April 05, 2004 12:37 PM
> To: struts-user@jakarta.apache.org
> Subject: Creating value objects using reflection class
>
>
> Hi,
>
> After receiving the form, I have to copy the value of each field to a
> value object. I wrote a small reflection utility class to server the
> purpose. Now I need more functionalities to that utility class.
>
> I was wondering if there is any utility package already out there
> which helps copy the contents from one object to another using
> reflection.
>
> thanks.
> - walk rustin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org