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

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

public class DateStringValidator

The DateStringValidator is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript for creating a date string validator. DateStringValidator is a validator that validates a String value according to a DateFormat.

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
DateStringValidator()
          Construct a default DateStringValidator which validates String values against the default formatting style.
DateStringValidator(java.text.DateFormat format)
          Construct a DateStringValidator which validates String values against the specified DateFormat.
DateStringValidator(int dateStyle)
          Construct a DateStringValidator which validates String values against the dateStyle.
DateStringValidator(java.lang.String formatString)
          Construct a DateStringValidator which validates String values against the formatString.
 
Method Summary
protected  java.lang.String getDefaultValidationMessage(TransformationInterface bean)
           
 java.text.DateFormat getFormat()
          Return the DateFormat used to validate string values as Dates.
protected  java.lang.String getValidationParameters(TransformationInterface bean)
           
 void setFormat(java.text.DateFormat newFormat)
          Set the DateFormat format used to validate strings values as dates.
 
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

DateStringValidator

public DateStringValidator()
Construct a default DateStringValidator which validates String values against the default formatting style. The default is to validate against all formatting styles. Various formatting styles:


DateStringValidator

public DateStringValidator(java.lang.String formatString)
Construct a DateStringValidator which validates String values against the formatString.

Parameters:
formatString - a String format which is used to validate a date strings.

DateStringValidator

public DateStringValidator(int dateStyle)
Construct a DateStringValidator which validates String values against the dateStyle.

Parameters:
dateStyle - an int date style

DateStringValidator

public DateStringValidator(java.text.DateFormat format)
Construct a DateStringValidator which validates String values against the specified DateFormat.

Parameters:
format - a DateFormat object to use to validate a date strings.
Method Detail

setFormat

public void setFormat(java.text.DateFormat newFormat)
Set the DateFormat format used to validate strings values as dates.

Parameters:
newFormat - the new value for the format property.

getFormat

public java.text.DateFormat getFormat()
Return the DateFormat used to validate string values as Dates.

Returns:
the value of the format property.

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.