struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David G. Friedman" <hum...@ix.netcom.com>
Subject RE: how to copy the properties of one Struts form-bean to another?
Date Wed, 26 Oct 2005 06:48:43 GMT
Starky,

The BeanUtils have been mentioned often on this list.  You can find it in
the Apache Commons BeanUtils library, which is found at:
http://jakarta.apache.org/commons/beanutils/

You are probably looking for BeanUtils.copyProperties() which you can find
an explanation for in their API:
http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.7.0/docs/api
/

Even though the various releases of Struts should contain a slightly
different version of the commons-beanutils.jar file, all of those jars in
your Struts distribution should have the that class and method.

Regards,
David

-----Original Message-----
From: À [mailto:knightli2003@gmail.com]
Sent: Wednesday, October 26, 2005 2:29 AM
To: Struts Users Mailing List
Subject: Re: how to copy the properties of one Struts form-bean to
another?


you can use apache common BeanUtils

2005/10/26, starki78 <starki78@libero.it>:
>
> Hi
>
> I've the following problem:
>
> Form 1:
> String a;
> String b;
> String c;
>
>
> Form 2:
> String a;
> String b;
>
>
> //--> I've to implement the following method
> public Form2 copy(Form1) {
>
> }
>
> //-->only the properties that are identical in the form
> shall be copied
> Is there already any bean-util implemented?
> I didn't find anything in the java-utils package
>
> Nice Greetings Starky


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message