commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon Messerschmidt <>
Subject [beanutils] Converter for String[]
Date Thu, 22 Apr 2004 06:20:19 GMT

I have a scenario where I need to convert a String array to a complex 
object.  I wrote a converter to do the conversion logic, but because my 
setter method does not take an array it does a scalar conversion.

Currently scalar values for String arrays only take the first String 
element, and discards the rest of the values.

I modified the setProperty() to pass the entire array object to a 
Converter as an Object.  This allows one to create Converters to convert 
String arrays to complex objects.  The default behavior (if no Converter 
is found) is still to use the first string as a scalar value.

If someone else find this useful I would be willing to send patches. 
Any commiters that are tickled?

~ Leon

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

View raw message