[ http://mc4j.org/jira/browse/STS-445?page=comments#action_11002 ] 
            
Frederic Daoud commented on STS-445:
------------------------------------

Thanks Tim!

I think this is quite a useable DateTypeConverter:

- It is easy to provide custom format strings

- If you want the user to enter the date *and* the time, this is also easy with 
the appropriate format string. This used to be a lot more work.

- The previous version had some behavior that many users perhaps did not 
expect, and that is what tripped us up. This version I think will not cause 
such surprises.

- The use of the resource bundle is *optional*.

- As Tim mentioned, if you need more sophisticated behavior, such as several 
different formats in different situations, it is reasonable that you would need 
to provide different subclasses. Also a valid point is that if your 
requirements simply clash too much with the behavior of the stock 
DateTypeConverter, you can write your own quite easily.

- Finally, a very important point that Tim raised throughout discussion: the 
change is fully backwards compatible. If you do nothing, everything will work 
the same way as it did before.



> Define custom date formats in StripesResources
> ----------------------------------------------
>
>                 Key: STS-445
>                 URL: http://mc4j.org/jira/browse/STS-445
>             Project: Stripes
>          Issue Type: Improvement
>          Components: Validation
>    Affects Versions: Release 1.5
>         Environment: Mac OS X 10.4.11, JDK1.5.0_07
>            Reporter: Iwao AVE!
>         Assigned To: Tim Fennell
>             Fix For: Release 1.5
>
>         Attachments: DateTypeConverter.java, DateTypeConverter.java, 
> DateTypeConverter.java
>
>
> John Newman had explained the problem accurately.
> I copied his comment from another issue.
> http://mc4j.org/jira/browse/STS-443#action_10935
> --
> it is currently too hard to add an extra format string
> 1) subclass DateTypeConverter
> 2) add in format string (mess due to array)
> 3) subclass TypeConverterFactory to use new DateConverter
> 4) register that in web.xml
> I have to do that in almost every app as every user has different ideas about 
> the way dates should be entered. it would be nice if I could just throw a 
> couple lines in that resource file and be done with it!
> --

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-development mailing list
Stripes-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to