Hello all,
two things about validators:
1. In ...17beta there was an Interface AbstractValidator() with the
method
public ValidationErrorMessage validate(FormComponent component)
now the validate method does not return any value, it's a void
method.
How can I mark the component as
Hi,
The preffered way now is to extend CustomValidator and call one of the
error(... methods of AbstractValidator when a validation error occurs.
This could be simple like in RequiredValidator
public void onValidate(String value)
{
// Check value
if (Strings.isEmpty(value))
I'm busy releasing 0.9.19-beta. Not 0.9.18-beta
Martijn
Eelco Hillenius wrote:
Hi,
The preffered way now is to extend CustomValidator and call one of the
error(... methods of AbstractValidator when a validation error occurs.
This could be simple like in RequiredValidator
public void
The wicket team is pleased to announce the Wicket 0.9.19-beta release!
http://wicket.sourceforge.net
Wicket is a Java web application framework that takes simplicity,
separation
of concerns and ease of development to a whole new level. Wicket pages
can be
mocked up, previewed and later revised
i didn't have time to read your question, but i wanted to just interject
that we already have very full support for date validation...
the idea with validators in wicket is that you should very /rarely/ ever
write one.
if your problem is something generic, maybe it belongs in wicket core...
Well, this part:
Caused by: java.util.MissingResourceException: Unable to find resource:
datenForm.text1.DatumsValidator
at wicket.Localizer.getString(Localizer.java:110)
at wicket.Localizer.getString(Localizer.java:212)
shows that Wicket looks for resource with resource key
Just one step forward to the solution:
If you use a CustomValidator and bind it to an TextField (and perhaps
other input fields) you MUST have a resource file with the name schemea
name of your class associated with the form element.properties. The
ressource file should contain the ressource name
Stefan Lindner wrote:
Just one step forward to the solution:
If you use a CustomValidator and bind it to an TextField (and perhaps
other input fields) you MUST have a resource file with the name schemea
name of your class associated with the form element.properties.
Actually, it is like name of
i think Localizer looks in other places too. for example in your
Application subclass, so you can have global string resources and not
have to dup them all over the place...
Eelco Hillenius wrote:
Stefan Lindner wrote:
Just one step forward to the solution:
If you use a CustomValidator and