|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.valid.BaseValidator
org.apache.tapestry.valid.AbstractNumericValidator
public abstract class AbstractNumericValidator
Base class for a number of implementations of IValidator
,
meant to replace the awkward NumberValidator
.
Field Summary |
---|
Fields inherited from class org.apache.tapestry.valid.BaseValidator |
---|
FIELD_SYMBOL, FORM_SYMBOL, FUNCTION_SYMBOL, VALIDATOR_SYMBOL |
Constructor Summary | |
---|---|
AbstractNumericValidator()
|
|
AbstractNumericValidator(boolean required)
|
|
AbstractNumericValidator(String initializer)
|
Method Summary | |
---|---|
protected String |
buildInvalidIntegerFormatMessage(IFormComponent field)
|
protected String |
buildInvalidNumericFormatMessage(IFormComponent field)
|
protected String |
buildNumberRangeMessage(IFormComponent field,
Number mininum,
Number maximum)
|
protected String |
buildNumberTooLargeMessage(IFormComponent field,
Number maximum)
|
protected String |
buildNumberTooSmallMessage(IFormComponent field,
Number minimum)
|
protected String |
buildRangeMessage(IFormComponent field,
Number minimum,
Number maximum)
|
protected abstract String |
getDefaultScriptPath()
|
String |
getInvalidIntegerFormatMessage()
|
String |
getInvalidNumericFormatMessage()
|
String |
getNumberRangeMessage()
|
String |
getNumberTooLargeMessage()
|
String |
getNumberTooSmallMessage()
|
String |
getScriptPath()
|
boolean |
getZeroIsNull()
If true, then when rendering, a zero is treated as a non-value, and null is returned. |
void |
setInvalidIntegerFormatMessage(String string)
Overrides the invalid-int-format bundle key. |
void |
setInvalidNumericFormatMessage(String string)
Overrides the invalid-numeric-format bundle key. |
void |
setNumberRangeMessage(String string)
Overrides the number-range bundle key. |
void |
setNumberTooLargeMessage(String string)
Overrides the number-too-large bundle key. |
void |
setNumberTooSmallMessage(String string)
Overrides the number-too-small bundle key. |
void |
setScriptPath(String scriptPath)
Allows a developer to use the existing validation logic with a different client-side script. |
void |
setZeroIsNull(boolean zeroIsNull)
|
Methods inherited from class org.apache.tapestry.valid.BaseValidator |
---|
buildRequiredMessage, checkRequired, formatString, formatString, formatString, getPattern, getRequiredMessage, isClientScriptingEnabled, isRequired, processValidatorScript, renderValidatorContribution, setClientScriptingEnabled, setRequired, setRequiredMessage, setScriptSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.valid.IValidator |
---|
toObject, toString |
Constructor Detail |
---|
public AbstractNumericValidator()
public AbstractNumericValidator(String initializer)
public AbstractNumericValidator(boolean required)
Method Detail |
---|
public boolean getZeroIsNull()
public void setZeroIsNull(boolean zeroIsNull)
public String getScriptPath()
public void setScriptPath(String scriptPath)
window.alert()
).
public String getInvalidNumericFormatMessage()
public String getInvalidIntegerFormatMessage()
public String getNumberRangeMessage()
public String getNumberTooLargeMessage()
public String getNumberTooSmallMessage()
public void setInvalidNumericFormatMessage(String string)
invalid-numeric-format
bundle key. Parameter {0} is the display
name of the field.
public void setInvalidIntegerFormatMessage(String string)
invalid-int-format
bundle key. Parameter {0} is the display name
of the field.
public void setNumberRangeMessage(String string)
number-range
bundle key. Parameter [0} is the display name of
the field. Parameter {1} is the minimum value. Parameter {2} is the maximum value.
public void setNumberTooLargeMessage(String string)
number-too-large
bundle key. Parameter {0} is the display name
of the field. Parameter {1} is the maximum allowed value.
public void setNumberTooSmallMessage(String string)
number-too-small
bundle key. Parameter {0} is the display name
of the field. Parameter {1} is the minimum allowed value.
protected String buildInvalidNumericFormatMessage(IFormComponent field)
protected String buildNumberTooSmallMessage(IFormComponent field, Number minimum)
protected String buildInvalidIntegerFormatMessage(IFormComponent field)
protected String buildNumberTooLargeMessage(IFormComponent field, Number maximum)
protected String buildNumberRangeMessage(IFormComponent field, Number mininum, Number maximum)
protected String buildRangeMessage(IFormComponent field, Number minimum, Number maximum)
protected abstract String getDefaultScriptPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |