[jsr-314-open] default converter for java.util.Date type

Andy Schwartz andy.schwartz at ORACLE.COM
Thu Apr 2 21:33:15 EDT 2009


Hey Dan -

As Matthias commented in the spec issue, we already do this for 
Trinidad, so, yep, makes sense to me to do this more generally.

Andy

Dan Allen wrote On 3/31/2009 1:11 AM ET:
> Issue 494 
> (https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=494) 
> seemed to have fallen off the map, but since I just implemented a 
> solution in Seam, I have decided to bring it back up. It's really 
> inconvenient not to have at least a default converter for the type 
> java.util.Date. While certainly dates inputs are something which vary 
> widely, it's tedious in the early stages of an application to have to 
> plug a DataTimeConverter on every input that accepts a date.
>
> The solution is as simple as registering DateTimeConverter with the 
> class java.util.Date and accepting the defaults. The developer can 
> simply specify a nested <f:convertDateTime> to override. The main 
> limitation is that there is no way to know if the developer intends to 
> capture a date or date + time since the type java.util.Date doesn't 
> provide this information. Thus, we capture date and let the user 
> specify a converter otherwise.
>
> -Dan
>
> -- 
> Dan Allen
> Senior Software Engineer, Red Hat | Author of Seam in Action
>
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>
> NOTE: While I make a strong effort to keep up with my email on a daily
> basis, personal or other work matters can sometimes keep me away
> from my email. If you contact me, but don't hear back for more than a 
> week,
> it is very likely that I am excessively backlogged or the message was
> caught in the spam filters.  Please don't hesitate to resend a message if
> you feel that it did not reach my attention.




More information about the jsr-314-open-mirror mailing list