|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.validator.util.AbstractUtilities
org.apache.shale.validator.validator.AbstractValidator
org.apache.shale.validator.validator.FloatValidator
public final class FloatValidator
Validator implementation that will perform both format
and (optional) range checks on a Float value.
| Field Summary |
|---|
| Fields inherited from class org.apache.shale.validator.validator.AbstractValidator |
|---|
ARG_VALUE, helper, MAXIMUM_VALUE, MINIMUM_VALUE, SUBMITTED_VALUE |
| Fields inherited from class org.apache.shale.validator.util.AbstractUtilities |
|---|
DEFAULT_RESOURCE_BUNDLE |
| Fields inherited from interface javax.faces.validator.Validator |
|---|
NOT_IN_RANGE_MESSAGE_ID |
| Constructor Summary | |
|---|---|
FloatValidator()
|
|
| Method Summary | |
|---|---|
float |
getMaximum()
Return the configured maximum value for this validator. |
float |
getMinimum()
Return the configured minimum value for this validator. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setMaximum(float maximum)
Set the configured maximum value for this validator. |
void |
setMinimum(float minimum)
Set the configured minimum value for this validator. |
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
Perform the correctness checks implemented by this
|
| Methods inherited from class org.apache.shale.validator.validator.AbstractValidator |
|---|
actions, convert, isClient, resources, setClient, validate |
| Methods inherited from class org.apache.shale.validator.util.AbstractUtilities |
|---|
getMessage, isTransient, message, message, message, setMessage, setTransient |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.faces.component.StateHolder |
|---|
isTransient, setTransient |
| Constructor Detail |
|---|
public FloatValidator()
| Method Detail |
|---|
public float getMaximum()
Return the configured maximum value for this validator.
public void setMaximum(float maximum)
Set the configured maximum value for this validator.
maximum - The new maximum valuepublic float getMinimum()
Return the configured minimum value for this validator.
public void setMinimum(float minimum)
Set the configured minimum value for this validator.
minimum - The new minimum value
public void validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.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 validate
javax.faces.validator.ValidatorException - if validation fails
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class AbstractValidatorpublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class AbstractValidator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||