com.plumtree.uiinfrastructure.validators
Class NotEmptyValidator

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

public class NotEmptyValidator
extends AValidator
implements IValidator

A PageControl Validator to check that the value of the page control is not null or an empty String

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)
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AValidator
m_sErrorMessage
 
Constructor Summary
NotEmptyValidator(java.lang.String _sFormName, java.lang.String _sInputName)
          Empty constructor creates a new NotEmptyValidator
 
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

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

NotEmptyValidator

public NotEmptyValidator(java.lang.String _sFormName,
                         java.lang.String _sInputName)
Empty constructor creates a new NotEmptyValidator

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.