|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.validator.DoubleRangeValidator
org.apache.myfaces.trinidad.validator.DoubleRangeValidator
public class DoubleRangeValidator
Implementation for java.lang.Double values.
| Field Summary | |
|---|---|
static String |
CONVERT_MESSAGE_ID
The message identifier of the FacesMessage to be created if the value cannot be converted |
static String |
MAXIMUM_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the maximum value check fails. |
static String |
MINIMUM_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the minimum value check fails. |
static String |
NOT_IN_RANGE_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the maximum or minimum value check fails, and both
the maximum and minimum values for this validator have been set. |
static String |
VALIDATOR_ID
|
| Fields inherited from class javax.faces.validator.DoubleRangeValidator |
|---|
TYPE_MESSAGE_ID |
| Constructor Summary | |
|---|---|
DoubleRangeValidator()
Construct a Validator with no preconfigured limits. |
|
DoubleRangeValidator(double maximum)
Construct a Validator with the specified preconfigured
limit. |
|
DoubleRangeValidator(double maximum,
double minimum)
Construct a Validator with the specified preconfigured
limits. |
|
| Method Summary | |
|---|---|
String |
getHintMaximum()
Return custom hint maximum message. |
String |
getHintMinimum()
Return custom hint minimum message. |
String |
getHintNotInRange()
Return custom hint notInRange message. |
double |
getMaximum()
Return the maximum value to be enforced by this Validator or null if it has not been
set. |
String |
getMessageDetailMaximum()
Return custom detail error message that was set for creating FacesMessage,
for cases where input value exceeds the maximum value set. |
String |
getMessageDetailMinimum()
Return custom detail error message that was set for creating FacesMessage,
for cases where, input value is less than the minimum value set. |
String |
getMessageDetailNotInRange()
Return custom detail error message that was set for creating FacesMessage,
for cases where, input value exceeds the maximum value and is
less than the minimum value set. |
double |
getMinimum()
Return the minimum value to be enforced by this Validator, or null if it has not been
set. |
ValueBinding |
getValueBinding(String name)
Deprecated. |
ValueExpression |
getValueExpression(String name)
Return the ValueExpression used to calculate the value for the
specified attribute name, if any. |
protected boolean |
isMaximumSet()
|
protected boolean |
isMinimumSet()
|
boolean |
isTransient()
|
void |
restoreState(FacesContext context,
Object state)
|
Object |
saveState(FacesContext context)
|
void |
setHintMaximum(String hintMaximum)
Custom hint maximum message. |
void |
setHintMinimum(String hintMinimum)
Custom hint minimum message. |
void |
setHintNotInRange(String hintNotInRange)
Custom hint notInRange message. |
void |
setMaximum(double maximum)
Set the maximum value to be enforced by this Validator. |
void |
setMessageDetailMaximum(String maximumMessageDetail)
Custom error message to be used, for creating detail part of the FacesMessage, when input value exceeds the maximum value set. |
void |
setMessageDetailMinimum(String minimumMessageDetail)
Custom error message to be used, for creating detail part of the FacesMessage, when input value is less the set
minimum value. |
void |
setMessageDetailNotInRange(String notInRangeMessageDetail)
Custom error message to be used, for creating detail part of the FacesMessage, when input value is not with in the range,
when minimum and maximum is set. |
void |
setMinimum(double minimum)
Set the minimum value to be enforced by this Validator. |
void |
setTransient(boolean transientValue)
|
void |
setValueBinding(String name,
ValueBinding binding)
Deprecated. |
void |
setValueExpression(String name,
ValueExpression expression)
Set the ValueExpression used to calculate the value for the
specified attribute if any. |
void |
validate(FacesContext context,
UIComponent component,
Object value)
|
| Methods inherited from class javax.faces.validator.DoubleRangeValidator |
|---|
equals |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VALIDATOR_ID
public static final String MAXIMUM_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the maximum value check fails. The message format
string for this message may optionally include {0},
{1} and {3} placeholders,
which will be replaced by user input, component label and configured
maximum value.
public static final String MINIMUM_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the minimum value check fails. The message format
string for this message may optionally include {0},
{1} and {2} placeholders, which will be replaced
by user input, component label and configured minimum value.
public static final String NOT_IN_RANGE_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the maximum or minimum value check fails, and both
the maximum and minimum values for this validator have been set.
The message format string for this message may optionally include
{0}, {1}, {2} and {3}
placeholders, which will be replaced by user input, component label,
configured minimum value and configured maximum value.
public static final String CONVERT_MESSAGE_ID
The message identifier of the FacesMessage to be created if the value cannot be converted
| Constructor Detail |
|---|
public DoubleRangeValidator()
Validator with no preconfigured limits.
public DoubleRangeValidator(double maximum)
Validator with the specified preconfigured
limit.
maximum - Maximum value to allow
public DoubleRangeValidator(double maximum,
double minimum)
Validator with the specified preconfigured
limits.
maximum - Maximum value to allowminimum - Minimum value to allow| Method Detail |
|---|
public double getMaximum()
Validator or null if it has not been
set.
getMaximum in class DoubleRangeValidatorpublic void setMaximum(double maximum)
Validator.
setMaximum in class DoubleRangeValidatormaximum - The new maximum valuepublic double getMinimum()
Validator, or null if it has not been
set.
getMinimum in class DoubleRangeValidatorpublic void setMinimum(double minimum)
Validator.
setMinimum in class DoubleRangeValidatorminimum - The new minimum valuepublic void setMessageDetailMaximum(String maximumMessageDetail)
Custom error message to be used, for creating detail part of the
FacesMessage, when input value exceeds the maximum value set.
MAXIMUM_MESSAGE_ID
maximumMessageDetail - Custom error message.public String getMessageDetailMaximum()
Return custom detail error message that was set for creating FacesMessage,
for cases where input value exceeds the maximum value set.
setMessageDetailMaximum(String)public void setMessageDetailMinimum(String minimumMessageDetail)
Custom error message to be used, for creating detail part of the
FacesMessage, when input value is less the set
minimum value.
MINIMUM_MESSAGE_ID
minimumMessageDetail - Custom error message.public String getMessageDetailMinimum()
Return custom detail error message that was set for creating FacesMessage,
for cases where, input value is less than the minimum value set.
setMessageDetailMinimum(String)public void setMessageDetailNotInRange(String notInRangeMessageDetail)
Custom error message to be used, for creating detail part of the
FacesMessage, when input value is not with in the range,
when minimum and maximum is set.
NOT_IN_RANGE_MESSAGE_ID
notInRangeMessageDetail - Custom error message.public String getMessageDetailNotInRange()
Return custom detail error message that was set for creating FacesMessage,
for cases where, input value exceeds the maximum value and is
less than the minimum value set.
setMessageDetailNotInRange(String)public void setHintMaximum(String hintMaximum)
Custom hint maximum message.
Overrides default hint message
hintMaximum - Custom hint message.public String getHintMaximum()
Return custom hint maximum message.
setHintMaximum(String)public void setHintMinimum(String hintMinimum)
Custom hint minimum message.
Overrides default hint message
hintMinimum - Custom hint message.public String getHintMinimum()
Return custom hint minimum message.
setHintMinimum(String)public void setHintNotInRange(String hintNotInRange)
Custom hint notInRange message.
Overrides default hint message
hintNotInRange - Custom hint message.public String getHintNotInRange()
Return custom hint notInRange message.
setHintNotInRange(java.lang.String)
public void validate(FacesContext context,
UIComponent component,
Object value)
throws ValidatorException
validate in interface Validatorvalidate in class DoubleRangeValidatorValidatorExceptionpublic Object saveState(FacesContext context)
saveState in interface StateHoldersaveState in class DoubleRangeValidator
public void restoreState(FacesContext context,
Object state)
restoreState in interface StateHolderrestoreState in class DoubleRangeValidator
public void setValueExpression(String name,
ValueExpression expression)
Set the ValueExpression used to calculate the value for the
specified attribute if any.
name - Name of the attribute for which to set a ValueExpressionexpression - The ValueExpression to set, or null
to remove any currently set ValueExpression
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this converterpublic ValueExpression getValueExpression(String name)
Return the ValueExpression used to calculate the value for the
specified attribute name, if any.
name - Name of the attribute or property for which to retrieve a
ValueExpression
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this converter
public void setValueBinding(String name,
ValueBinding binding)
Set the ValueBinding used to calculate the value for the
specified attribute if any.
name - Name of the attribute for which to set a ValueBindingbinding - The ValueBinding to set, or null
to remove any currently set ValueBinding
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this validatorpublic ValueBinding getValueBinding(String name)
Return the ValueBinding used to calculate the value for the
specified attribute name, if any.
name - Name of the attribute or property for which to retrieve a
ValueBinding
NullPointerException - if name
is null
IllegalArgumentException - if name is not a valid
attribute of this validatorpublic boolean isTransient()
isTransient in interface StateHolderisTransient in class DoubleRangeValidatorpublic void setTransient(boolean transientValue)
setTransient in interface StateHoldersetTransient in class DoubleRangeValidatorprotected boolean isMaximumSet()
protected boolean isMinimumSet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||