i may be wrong, but the localizer only uses components to find
resourcebundles.
as a consequence, the messages should rather go into
MyValidatedComponent.properties instead of MyValidator.properties
it would make sense though to be able to package a properties file with a
custom validator to ship it as an independent bundle.
Gerolf
On 10/24/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>
> When I create a custom validator, how can I provide my own default
> feedback messages?
>
> I tried:
>
> 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
>
> But the resource bundles are not found. Am I assuming something wrong
> and should I do this in another way? Or is this an oversight and
> should it be fixed?
>
> Martijn
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0-beta4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/
>