I'm having a little problem with validation, and would like an extra pair of
eyes.
I have a form that gets validated, with a custom message defined in the
class properties file.
In Share.java:
...
add( new SendFileForm("sendForm"));
...
class SendFileForm extends Form {
...
TextField senderField = new TextField("senderField");
senderField.add(StringValidator.maximumLength(254));
senderField.setRequired(true);
add(senderField);
...
In Share.properties:
StringValidator.maximum=${label} must be no longer than ${maximum}
characters.
sendForm.senderField.Required=You must provide your email address to
proceed.
When I run as above, this works fine. No problems, custom messages show up,
and all is well.
However, if in my Application class, I add the following line during init():
getResourceSettings().setUseDefaultOnMissingResource(false);
Suddenly, I get exceptions that the error messages are not found, ala:
ERROR - RequestCycle - Exception
'java.util.MissingResourceException: Unable to find resource:
senderField.StringValidator.maximum for component: sendForm
Any ideas as to why this would happen? I wanted to be as strict as possible
with my error handling, but setting that flag causes all my validation to
throw exceptions. Where am I going wrong?
Thanks for insight,
Spencer
--
View this message in context:
http://www.nabble.com/Wicket-Validation-Error-tf4386270.html#a12504756
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]