[
https://issues.apache.org/jira/browse/WICKET-5293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov updated WICKET-5293:
------------------------------------
Assignee: (was: 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
> Priority: Minor
> Attachments: demo-bug-inLocalizedErrorTestCase-Wicket-1.5-5293.patch,
> fix-WICKET-5-5293.patch, fix-WICKET-6-5293.patch,
> fix-v2-bug-WICKET-1.5-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 was sent by Atlassian JIRA
(v6.3.4#6332)