|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.behavior.Behavior org.apache.wicket.validation.validator.RangeValidator<Z>
Z
- type of validatablepublic class RangeValidator<Z extends Comparable<Z> & Serializable>
Validator for checking if a given value falls within [min,max] range.
Constructor Summary | |
---|---|
protected |
RangeValidator()
Constructor used for subclasses who want to set the range using setRange(Comparable, Comparable) |
|
RangeValidator(Z minimum,
Z maximum)
Constructor that sets the minimum and maximum values. |
Method Summary | |
---|---|
Z |
getMaximum()
Gets the maximum value. |
Z |
getMinimum()
Gets the minimum value. |
protected String |
resourceKey()
Gets the message resource key for this validator's error message from the ApplicationSettings class. |
protected void |
setRange(Z minimum,
Z maximum)
Sets validator range |
void |
validate(IValidatable<Z> validatable)
Validates the IValidatable instance. |
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
afterRender, beforeRender, bind, canCallListenerInterface, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, renderHead, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeValidator(Z minimum, Z maximum)
minimum
- the minimum valuemaximum
- the maximum valueprotected RangeValidator()
setRange(Comparable, Comparable)
Method Detail |
---|
protected final void setRange(Z minimum, Z maximum)
minimum
- maximum
- public void validate(IValidatable<Z> validatable)
IValidatable
instance. Validation errors should be reported using
the IValidatable.error(IValidationError)
method.
validate
in interface IValidator<Z extends Comparable<Z> & Serializable>
validatable
- the IValidatable
instance being validatedpublic Z getMinimum()
public Z getMaximum()
protected String resourceKey()
ApplicationSettings
class.
NOTE: THIS METHOD SHOULD NEVER RETURN null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |