public final class DoubleValidator extends AbstractValidator implements javax.faces.component.StateHolder
Validator implementation that will perform both format
and (optional) range checks on a Double value.
ARG_VALUE, helper, MAXIMUM_VALUE, MINIMUM_VALUE, SUBMITTED_VALUEDEFAULT_RESOURCE_BUNDLE| Constructor and Description |
|---|
DoubleValidator() |
| Modifier and Type | Method and Description |
|---|---|
double |
getMaximum()
Return the configured maximum value for this validator.
|
double |
getMinimum()
Return the configured minimum value for this validator.
|
void |
restoreState(javax.faces.context.FacesContext context,
Object state) |
Object |
saveState(javax.faces.context.FacesContext context) |
void |
setMaximum(double maximum)
Set the configured maximum value for this validator.
|
void |
setMinimum(double minimum)
Set the configured minimum value for this validator.
|
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Perform the correctness checks implemented by this
Validator against the specified UIComponent. |
actions, convert, isClient, resources, setClient, validategetMessage, isTransient, message, message, message, setMessage, setTransientpublic double getMaximum()
Return the configured maximum value for this validator.
public void setMaximum(double maximum)
Set the configured maximum value for this validator.
maximum - The new maximum valuepublic double getMinimum()
Return the configured minimum value for this validator.
public void setMinimum(double minimum)
Set the configured minimum value for this validator.
minimum - The new minimum valuepublic void validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
throws javax.faces.validator.ValidatorException
Perform the correctness checks implemented by this
Validator against the specified UIComponent.
If any violations are found, a ValidatorException
will be thrown containing the FacesMessage
describing the failure.
IMPLEMENTATION NOTE: Unlike earlier implementations of Shale Validator integration, validators that subclass this class do not support the option to skip server side validation.
validate in interface javax.faces.validator.Validatorvalidate in class AbstractValidatorcontext - FacesContext for the current requestcomponent - UIComponent we are checking for correctnessvalue - The value to validatejavax.faces.validator.ValidatorException - if validation failspublic void restoreState(javax.faces.context.FacesContext context,
Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class AbstractValidatorpublic Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class AbstractValidatorCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.