>> It sounds like this is not happening in your case, but there are not >> enough details provided to know exactly where the difficulty lies.
It the first time I use BeanUtils to affect data I use it before only to consult data ... In detail, I must init an object with multiple data source (data base MySQL/DB2, XML file, ...) so I must use a method who takes 2 objects : void fusionner( Object orig, Object valueObject ) and must init the attributes of the first with attributes from the other. I must not test the type of the 2 objects attributes so I can't cast them with the corect type. >> When you use setProperty() like this, BeanUtils requires that the data >> type of the value must either >> >> * Match exactly the data type of this property (Collection) >> I try to do this and look at the value of voDesc.get( attrName ).getClass() and when it must be a Collection I found a String. >> * Have a registered Converter that knows how to change >> the provided data type into the one needed by the >> property. I think to externalize the object config to create a Map with (key = attribute name, value = attribute class) and define a method : Class getAttributeType( String attrName ) who return the configured type for this attribute. It work. It is probably a stupid question block with it : How could I cast the data with the result of my method ? Nicolas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
