commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Converting properties to String
Date Thu, 09 Jun 2005 03:18:02 GMT
I understand how to use the Converter interface with BeanUtils to 
convert String data to a target type. How do I do the reverse? In other 
words, how to I extend the standard type of X --> String conversions?

I realise I can call getConvertUtils().register(myConverter, 
String.class) but that would replace the default to-String conversions, 
which is not what I want.

I could get the default converter with 
getConvertUtils.lookup(String.class) and pass that into my converter, 
allowing me to delegate to it when the source type of the property is 
not one I'm interested in, but that seems a little cumbersome.

Is there an easier / better way?

Thanks,

L.


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


Mime
View raw message