[
https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585932#action_12585932
]
Juergen Donnerstag commented on WICKET-1103:
--------------------------------------------
You can do this already.
ClassStringResourceLoader loader = new
ClassStringResourceLoader(MyValidator.class);
getResourceSettings().addStringResourceLoader(loader);
Please be aware that when calling addStringResourceLoader() the first time,
it'll reset the list of loaders. Thus you have to add wicket's default loaders
again.
stringResourceLoaders.add(new ComponentStringResourceLoader());
stringResourceLoaders.add(new PackageStringResourceLoader());
stringResourceLoaders.add(new
ClassStringResourceLoader(this.application.getClass()));
The package loader is under way and almost ready.
> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
> Key: WICKET-1103
> URL: https://issues.apache.org/jira/browse/WICKET-1103
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-M1
> Reporter: Martijn Dashorst
> Assignee: Juergen Donnerstag
> Fix For: 1.4-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
> protected void onValidate(IValidatable v) {
> error(v);
> }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.