commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samplez <>
Subject BeanUtilsBean does not copy collection property
Date Mon, 17 Nov 2008 10:18:16 GMT


I have a following problem with copying a collection property from class B
to A:

class A {
     List getItems();

class B {
     List getItems();

Now, I use BeanUtilsBean.copyProperties(a, b) to copy properties from
instance b to a. As you can see, my class A does not have a 'setter' method
on 'items' list, but I want beanutils to invoke 'getitems().add()' instead
of 'setItems'. Is there a way co configure it?

As a background, I can mention that I dont have sources for classes A & B -
I use them from a JAR library, so I have to use them the way they are.

View this message in context:
Sent from the Commons - User mailing list archive at

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

View raw message