|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.markup.html.form.validation.AbstractValidator wicket.markup.html.form.validation.RequiredValidator
public class RequiredValidator
This validator has been deprecated in favor of
FormComponent.setRequired(boolean)
Validator that ensures a component has a non-null and non-empty value. If the
component's value is null or empty (a value is considered empty if it just
contains whitespace) when its containing form is submitted then the
errorMessage() method will be called by the framework.
Constructor Summary | |
---|---|
protected |
RequiredValidator()
Deprecated. Protectected constructor to force use of static singleton accessor method. |
Method Summary | |
---|---|
static RequiredValidator |
getInstance()
Deprecated. |
void |
onValidate(FormComponent formComponent,
java.lang.String value)
Deprecated. Validates whether the input value is not-null or empty. |
java.lang.String |
toString()
Deprecated. |
void |
validate(FormComponent component)
Deprecated. Instead of subclassing IValidator, you should use one of the existing validators, which cover a huge number of cases, or if none satisfies your need, subclass one of the Type validators like StringValidator ,
NumberValidator or DateValidator |
Methods inherited from class wicket.markup.html.form.validation.AbstractValidator |
---|
error, error, error, error, messageModel, resourceKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected RequiredValidator()
Method Detail |
---|
public static RequiredValidator getInstance()
public void validate(FormComponent component)
IValidator
Instead of subclassing IValidator, you should use one of the existing
validators, which cover a huge number of cases, or if none satisfies your
need, subclass one of the Type validators like StringValidator
,
NumberValidator
or DateValidator
Validates the given input. The input corresponds to the input from the request for a component.
component
- Component to validateIValidator.validate(wicket.markup.html.form.FormComponent)
public final void onValidate(FormComponent formComponent, java.lang.String value)
FormComponent.isInputNullable()
,
that is interpreted as the component being disabled too. If that is the
case, validation will not be executed.
formComponent
- The form component that is checkedvalue
- The input value of the formcomponent (not converted value)StringValidator.onValidate(wicket.markup.html.form.FormComponent,
java.lang.String)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |