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

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

public class MaximumLengthValidator

The DateStringValidator is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript for creating a maximum length validator. A MaximumLengthValidator is a validator that validates the maximum length of an element.

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
 
Fields inherited from class com.sas.util.validators.Validator
message, messages, msgObject
 
Constructor Summary
MaximumLengthValidator()
          Constructs a new MaximumLengthValidator Transformation Bean.
MaximumLengthValidator(int max)
          Constructs a new MaximumLengthValidator Transformation Bean
 
Method Summary
protected  java.lang.String getDefaultValidationMessage(TransformationInterface bean)
           
 int getMaxLength()
          Returns the maxumum length set.
protected  java.lang.String getValidationParameters(TransformationInterface bean)
           
 void setMaxLength(int max)
          Sets the maximum length 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
 

Constructor Detail

MaximumLengthValidator

public MaximumLengthValidator()
Constructs a new MaximumLengthValidator Transformation Bean. The default maximum length value is 50.


MaximumLengthValidator

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

Parameters:
max - The maximum length value
Method Detail

setMaxLength

public void setMaxLength(int max)
Sets the maximum length to use.

Parameters:
max - the maximum length to use.

getMaxLength

public int getMaxLength()
Returns the maxumum length set.

Returns:
the maximum length.

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.