You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2013/08/01 09:25:48 UTC

[jira] [Assigned] (WICKET-5293) MessageSource resource key traversal logic short-circuited and throws exception when useDefaultOnMissingResource is false and throwExceptionOnMissingResource is true

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

Martin Grigorov reassigned WICKET-5293:
---------------------------------------

    Assignee: Martin Grigorov
    
> MessageSource resource key traversal logic short-circuited and throws exception when useDefaultOnMissingResource is false and throwExceptionOnMissingResource is true
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5293
>                 URL: https://issues.apache.org/jira/browse/WICKET-5293
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.10, 6.9.1
>         Environment: OS X
>            Reporter: Liam Clarke
>            Assignee: Martin Grigorov
>            Priority: Minor
>         Attachments: fix-WICKET-5-5293.patch, fix-WICKET-6-5293.patch, quickstartWicket1.5.10.zip, quickstartWicket6.9.1.zip
>
>
> MessageSource, when dealing with a validation error, will traverse resource keys from most specific to most general. This mechanism allows you to use one resource across multiple validators.
> However, as it uses a Localizer to check for the existence of the most specific message, it will never try any more general resource keys when getApplication().getResourceSettings().getUseDefaultOnMissingResource is false and getApplication().getResourceSettings().getThrowExceptionOnMissingResource is true - the Localizer throws the exception which MessageSource.getMessage does not handle.
> This means that you cannot reuse resources by giving them generalised keys. 
> Please see the attached quick starts for working demonstrations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira