com.sas.servlet.tbeans.util.validators
Class MaximumValueValidator

com.sas.servlet.tbeans.util.validators.MaximumValueValidator
All Implemented Interfaces:
JavaScriptValidationInterface, com.sas.servlet.tbeans.util.validators.JavaScriptValidationObjectCreationInterface, com.sas.servlet.tbeans.util.validators.JavaScriptValidationOnChangeInterface, ValidationInterface, java.io.Serializable

public class MaximumValueValidator

The MaximumValueValidator is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript for creating a maximum value validator. A MaximumValueValidator is a validator that validates that the value does not exceed the maximum value specified.

For More Information:

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
Serialized Form

Field Summary
static java.lang.String FLOAT
           
static java.lang.String INTEGER
           
protected  java.lang.String type
          Flag to determine whether to validate integers or floats.
 
Fields inherited from class com.sas.util.validators.Validator
message, messages, msgObject
 
Constructor Summary
MaximumValueValidator()
          Constructs a new MaximumValueValidator Transformation Bean.
MaximumValueValidator(int max)
          Constructs a new MaximumValueValidator Transformation Bean
 
Method Summary
protected  java.lang.String getDefaultValidationMessage(TransformationInterface bean)
           
 int getMaxValue()
          Returns the maxumum value set.
protected  java.lang.String getValidationParameters(TransformationInterface bean)
           
 void setMaxValue(int max)
          Sets the maximum value to use.
 
Methods inherited from class com.sas.servlet.tbeans.util.validators.JavaScriptValidator
createValidationFunctionCall, getClearErrorsFunctionName, getDescription, getErrorHandlerFunctionName, getValidationFunctionName, setClearErrorsFunctionName, setErrorHandlerFunctionName, setValidationFunctionName
 
Methods inherited from class com.sas.util.validators.Validator
createValidationMessages, getExtendedBeanInfo, getValidationMessage, getValidationMessageCode, newValidationMessage, normalizeValue, setValidationMessage, setValidationMessageCode, validateValue
 
Methods inherited from interface com.sas.util.validators.ValidationInterface
getValidationMessage, getValidationMessageCode, normalizeValue, setValidationMessage, validateValue
 

Field Detail

INTEGER

public static final java.lang.String INTEGER
See Also:
Constant Field Values

FLOAT

public static final java.lang.String FLOAT
See Also:
Constant Field Values

type

protected java.lang.String type
Flag to determine whether to validate integers or floats. Valid values are: INTEGER or FLOAT

Constructor Detail

MaximumValueValidator

public MaximumValueValidator()
Constructs a new MaximumValueValidator Transformation Bean. The default maximum value is 100.


MaximumValueValidator

public MaximumValueValidator(int max)
Constructs a new MaximumValueValidator Transformation Bean

Parameters:
max - The maximum value
Method Detail

setMaxValue

public void setMaxValue(int max)
Sets the maximum value to use.

Parameters:
max - the maximum value to use.

getMaxValue

public int getMaxValue()
Returns the maxumum value set.

Returns:
the maximum value.

getDefaultValidationMessage

protected java.lang.String getDefaultValidationMessage(TransformationInterface bean)
Overrides:
getDefaultValidationMessage in class JavaScriptValidator

getValidationParameters

protected java.lang.String getValidationParameters(TransformationInterface bean)
Overrides:
getValidationParameters in class JavaScriptValidator



Copyright © 2009 SAS Institute Inc. All Rights Reserved.