com.plumtree.uiinfrastructure.validators
Class LengthValidator

java.lang.Object
  extended by com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
      extended by com.plumtree.uiinfrastructure.validators.LengthValidator
All Implemented Interfaces:
IValidator

public class LengthValidator
extends AValidator
implements IValidator

Validates that a input value is less than a given length

Author:
caiusv

Field Summary
 java.lang.String m_strFormName
          name of the form where this validator appears (used by JavaScript validation)
 java.lang.String m_strInputName
          name of the input which this validator works on (used by JavaScript validation)
 java.lang.String VALIDATOR_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
m_sErrorMessage
 
Constructor Summary
LengthValidator(java.lang.String _sFormName, java.lang.String _sInputName, int _iMax, int _iMin)
          Creates a new PositiveIntValidator.
 
Method Summary
 java.lang.String GetJSFunction(java.lang.String _sParameters)
          Return the name of the JavaScript validation method along with whatever parameters the script needs.
 java.lang.String GetJSValidationCode()
          Returns the JavaScript Validation method that may be used on a page to validate associated form input.
 java.lang.String GetName()
          Return the name of this Validator
 UIError Validate(java.lang.Object _oObject)
          Validation method.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
GetErrorMessage, SetErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IValidator
SetErrorMessage
 

Field Detail

VALIDATOR_NAME

public java.lang.String VALIDATOR_NAME

m_strFormName

public java.lang.String m_strFormName
name of the form where this validator appears (used by JavaScript validation)


m_strInputName

public java.lang.String m_strInputName
name of the input which this validator works on (used by JavaScript validation)

Constructor Detail

LengthValidator

public LengthValidator(java.lang.String _sFormName,
                       java.lang.String _sInputName,
                       int _iMax,
                       int _iMin)
Creates a new PositiveIntValidator.

Parameters:
_sFormName - name of the form whre this appears
_sInputName - name of the input element
_sDefaultValue - default value of the input element
Method Detail

Validate

public UIError Validate(java.lang.Object _oObject)
Description copied from interface: IValidator
Validation method. The Validation method returns a UIError object if the object passed in fails to meet the validation criteria. Otherwise it returns null. Every class the implements IValidator should have a fully implemented Validate method for server side validation.

Specified by:
Validate in interface IValidator
Returns:
UIError or null

GetJSValidationCode

public java.lang.String GetJSValidationCode()
Returns the JavaScript Validation method that may be used on a page to validate associated form input.

Specified by:
GetJSValidationCode in interface IValidator
Returns:
See Also:
IValidator.GetJSValidationCode()

GetJSFunction

public java.lang.String GetJSFunction(java.lang.String _sParameters)
Return the name of the JavaScript validation method along with whatever parameters the script needs.

Specified by:
GetJSFunction in interface IValidator
Parameters:
_sParameters - areguments to Javascript function
Returns:

GetName

public java.lang.String GetName()
Return the name of this Validator

Specified by:
GetName in interface IValidator



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.