commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james_strac...@yahoo.co.uk>
Subject Re: [beanutils] default converters for File and URL?
Date Fri, 04 Apr 2003 16:13:48 GMT

On Friday, April 4, 2003, at 04:57 PM, Henri Yandell wrote:

>
> On Fri, 4 Apr 2003, James Strachan wrote:
>
>> On Friday, April 4, 2003, at 04:04 PM, Joe Germuska wrote:
>>
>>> But what if I'm using some library that has its own conversion needs,
>>> for example, in reading in an XML configuration file?   I guess most
>>> conversions are pretty universal, volatile, but I can easily imagine
>>> conflicting Converters for java.util.Date, for example.
>
> Looking at Converters, why is there no UtilDateConverter? Or just
> DateConverter?
>
> Also, why does said converter not take a DateFormat in some way to 
> allow
> instance users to be able to allow that to be configurable?
>
> Possibly the Converter API needs an additional argument-list option?
>
> So I can say:
>
> converterBean.convert(java.util.Date.class, "02/02/02", "YY/DD/MM")

While we're at it, it could be useful to add a Locale to a 
ConverterUtilsBean so that converters can be locale-specific.

James
-------
http://radio.weblogs.com/0112098/


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


Mime
View raw message