org.apache.tapestry.valid
Class IntValidator
java.lang.Object
org.apache.tapestry.valid.BaseValidator
org.apache.tapestry.valid.AbstractNumericValidator
org.apache.tapestry.valid.IntValidator
- All Implemented Interfaces:
- IValidator
public class IntValidator
- extends AbstractNumericValidator
A type-specific replacement for
NumberValidator
.
- Author:
- Howard M. Lewis Ship
Methods inherited from class org.apache.tapestry.valid.AbstractNumericValidator |
buildInvalidIntegerFormatMessage, buildInvalidNumericFormatMessage, buildNumberRangeMessage, buildNumberTooLargeMessage, buildNumberTooSmallMessage, buildRangeMessage, getInvalidIntegerFormatMessage, getInvalidNumericFormatMessage, getNumberRangeMessage, getNumberTooLargeMessage, getNumberTooSmallMessage, getScriptPath, getZeroIsNull, setInvalidIntegerFormatMessage, setInvalidNumericFormatMessage, setNumberRangeMessage, setNumberTooLargeMessage, setNumberTooSmallMessage, setScriptPath, setZeroIsNull |
Methods inherited from class org.apache.tapestry.valid.BaseValidator |
buildRequiredMessage, checkRequired, formatString, formatString, formatString, getPattern, getRequiredMessage, isClientScriptingEnabled, isRequired, processValidatorScript, setClientScriptingEnabled, setRequired, setRequiredMessage, setScriptSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntValidator
public IntValidator()
IntValidator
public IntValidator(String initializer)
toString
public String toString(IFormComponent field,
Object value)
- Description copied from interface:
IValidator
- Invoked during rendering to convert an object value (which may be null) to a String. It is
acceptible to return null. The string will be the VALUE attribute of the HTML text field.
toObject
public Object toObject(IFormComponent field,
String value)
throws ValidatorException
- Description copied from interface:
IValidator
- Converts input, submitted by the client, into an object value. May return null if the input
is null (and the required flag is false).
The input string will already have been trimmed. It may be null.
- Throws:
ValidatorException
- if the string cannot be converted into an object, or the object is not valid (due
to other constraints).
renderValidatorContribution
public void renderValidatorContribution(IFormComponent field,
IMarkupWriter writer,
IRequestCycle cycle)
- Description copied from class:
BaseValidator
- This implementation does nothing. Subclasses may supply their own implementation.
- Specified by:
renderValidatorContribution
in interface IValidator
- Overrides:
renderValidatorContribution
in class BaseValidator
setMaximum
public void setMaximum(int maximum)
setMinimum
public void setMinimum(int minimum)
getDefaultScriptPath
protected String getDefaultScriptPath()
- Specified by:
getDefaultScriptPath
in class AbstractNumericValidator
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.