commons-user mailing list archives

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

Hi,

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.

Cheers,
Samplez
-- 
View this message in context: http://www.nabble.com/BeanUtilsBean-does-not-copy-collection-property-tp20536870p20536870.html
Sent from the Commons - User mailing list archive at Nabble.com.


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


Mime
View raw message