[ 
https://issues.apache.org/jira/browse/WICKET-5437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5437.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 7.0.0
                   6.13.0
         Assignee: Martin Grigorov

I've committed my suggestion.
Now if there are no i18n keys that match Wicket will use the message.

But I think in your case there is some generic key that matches, no ?

> When a ConversionException is thrown, its message is not used in the 
> ValidationError
> ------------------------------------------------------------------------------------
>
>                 Key: WICKET-5437
>                 URL: https://issues.apache.org/jira/browse/WICKET-5437
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.11.0
>            Reporter: Dan Haywood
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 6.13.0, 7.0.0
>
>
> Probably affects 6.12 also, though haven't checked.
> As noted by Martin Grigorov in ISIS-621:
> The code for creating a ValidationError is at
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?source=c#L1219
> As you can see the cause's message is not used :-/
> The problem is:
> ValidationError error = new ValidationError();
> it should be:
> ValidationError error = new ValidationError(cause.getMessage());
> Later at 
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/validation/ValidationError.java?source=c#L241
>  Wicket will look for i18n keys and fallback to the message.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to