[ https://issues.apache.org/jira/browse/WICKET-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489989 ]
Ville Peurala commented on WICKET-485: -------------------------------------- The problem we have is that we have an existing resource bundle which is used by multiple applications. We need to use error messages from there, but we cannot change the keys, so we cannot use error keys like "StringValidator.Range". We must use existing error keys like "error_value_too_long". What I would like to do is use ready-made validators (like StringValidator.MaximumLengthValidator) like this: input.add(new StringValidator.MaximumLengthValidator() { @Override protected String resourceKey(FormComponent component) { return "error_value_too_long"; } }); But this cannot be done now, since those inner classes are private (this code example does not compile). > Private inner classes of StringValidator should be public > --------------------------------------------------------- > > Key: WICKET-485 > URL: https://issues.apache.org/jira/browse/WICKET-485 > Project: Wicket > Issue Type: Improvement > Components: wicket > Reporter: Ville Peurala > Assigned To: Igor Vaynberg > Priority: Minor > > Inner classes of StringValidator, like MaximumLengthValidator, are currently > private and created only via factory methods. They should be public so that > their method resourceKey(FormComponent) could be overridden. Currently you > can't use these ready-made validators if you need to use an existing resource > bundle key for error messages. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.