commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <>
Subject Re: BeanUtils Feature
Date Sat, 24 Jan 2004 01:29:23 GMT
Anon Myous wrote:
> I understand the properties of a an original bean
> can be copied over to the destination bean using the
> copyProperty method, but is there a way that only a
> subset of properties specified possibly in a
> java.util.List or something can be copied over from
> the original bean to the destination bean.

If you want to copy all properties, BeanUtils.copyProperties() should do 
the job.

For a subset, you'll probably have to write your own custom Converter 
and register it via:

ConvertUtils.register(yourConverter, YourBean.class)

I had to do something similar to this recently.

> If this question has been raised previously and
> somebody has already posted an answer , could somebody
> please guide me towards that snippet ?

To see previously asked and answered questions, your best best is 
probably the mail archives:

I use

but there are a few others around the web.

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

View raw message