BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogicx.jsp.tags.validators
Interface Validatable

All Known Implementing Classes:
ValidatableAdapter

public interface Validatable

All validators directly or indirectly should implement the following interface and it is used by Summary to call methods on them.

Author:
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
static java.lang.String ENCODED_SEPERATOR
          string denoting the hidden field's encoded seperator
static java.lang.String SEPERATOR
          string denoting the "read" seperator for reading the parameter from the request and translating it back into a Validatable object
 
Method Summary
 Validatable decodeHiddenField(java.lang.String stringToDecode)
          given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.
 java.lang.String getErrorMessage()
           
 java.lang.String getFieldToValidate()
           
 boolean isValid()
          returns whether the validation was successful
 void setIsValid(boolean b)
          set whether the particular validator was successful or not
 boolean validate(javax.servlet.ServletRequest req)
          validate method where all the logic for validation lies.
 java.lang.String writeHiddenField()
          write a hidden input type e.g.
 

Field Detail

ENCODED_SEPERATOR

public static final java.lang.String ENCODED_SEPERATOR
string denoting the hidden field's encoded seperator

SEPERATOR

public static final java.lang.String SEPERATOR
string denoting the "read" seperator for reading the parameter from the request and translating it back into a Validatable object
Method Detail

setIsValid

public void setIsValid(boolean b)
set whether the particular validator was successful or not

isValid

public boolean isValid()
returns whether the validation was successful

validate

public boolean validate(javax.servlet.ServletRequest req)
                 throws java.lang.Exception
validate method where all the logic for validation lies.

getFieldToValidate

public java.lang.String getFieldToValidate()

Returns:
fieldToValidate

getErrorMessage

public java.lang.String getErrorMessage()

Returns:
errorMessage

writeHiddenField

public java.lang.String writeHiddenField()
write a hidden input type e.g. className=classImplementingValidatable+ENCODED_SEPERATOR+ fieldToValidate=somefield+ENCODED_SEPERATOR+expression=someexpr +ENCODED_SEPERATOR+errorMessage

decodeHiddenField

public Validatable decodeHiddenField(java.lang.String stringToDecode)
                              throws java.lang.Exception
given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.

Parameters:
string - to decode

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.