Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
6.2.0
-
None
Description
There are two DateConverter implementations in wicket:
[1] wicket.util.convert.DateConverter
[2] wicket.datetime.DateConverter
When an error occures while converting the input, both throw a ConversionException. This ConversionException has a property called 'format' which is later used to get a localized pattern for error messages. But since they base on different formatter classes (jdk/joda-time), the formatter of [2] is incompatible to the format property.
So I can see 2 ways of solving this issue:
1. put an already localized pattern as a variable (also named 'format') in ConversionException (using ConversionException .setVariable() - those variables are later also applied to the error message)
2. Alter the class ConversionException so its property 'format' holds the localized pattern as a string, instead of an instance of SimpleDateFormat