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

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

public class MinimumValueValidator

The MinimumValueValidator is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript for creating a minimum value validator. A MinimumValueValidator is a validator that validates that the value is not less than the minimum 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
MinimumValueValidator()
          Constructs a new MinimumValueValidator Transformation Bean.
MinimumValueValidator(int min)
          Constructs a new MinimumValueValidator Transformation Bean
 
Method Summary
protected  java.lang.String getDefaultValidationMessage(TransformationInterface bean)
           
 int getMinValue()
          Returns the minumum value set.
protected  java.lang.String getValidationParameters(TransformationInterface bean)
           
 void setMinValue(int min)
          Sets the minimum 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

MinimumValueValidator

public MinimumValueValidator()
Constructs a new MinimumValueValidator Transformation Bean. The default minimum value is 0.


MinimumValueValidator

public MinimumValueValidator(int min)
Constructs a new MinimumValueValidator Transformation Bean

Parameters:
min - The minimum value
Method Detail

setMinValue

public void setMinValue(int min)
Sets the minimum value to use.

Parameters:
min - the minimum value to use.

getMinValue

public int getMinValue()
Returns the minumum value set.

Returns:
the minimum 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.