commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Simple question re BeanUtils and dates
Date Mon, 07 Apr 2003 12:18:12 GMT
On Monday, April 7, 2003, at 12:55 PM, Knight, Digby wrote:

> Hi,
> I'm afraid my firewall blocks searching the mail archives, so I'm having 
> to
> ask a question that's probably been asked before.

FYI as well as eyebrowse running on the apache site 
(http://archives.apache.org/eyebrowse/ViewLists), http://marc.theaimsgroup.
com/ and http://www.mail-archive.com/ both have searchable archives. it'd 
be unusual if all these were blocked.

> I'm trying to use BeanUtils to set a date property of a bean from an
> HttpRequest (in yyyy-mm-dd format), but can't see how to do it with 
> standard
> functionality (BeanUtils.setProperty() or BeanUtils.populate()). I have
> written and registered my own DateConverter which worked, but seems an
> unlikely thing to have to do when there are all the standard converters
> available.

dates are difficult things since there isn't a single format for them. 
there is a localized standard converter for dates 
(org.apache.commons.beanutils.locale.DateLocaleConverter) but registering 
your own DateConverter is IMHO a good way to approach this problem.

- robert


Mime
View raw message