BEA Systems, Inc.

BEA WebLogic Server 9.0 API Reference


weblogicx.jsp.tags.validators
Class CustomValidator

java.lang.Object
  extended byweblogicx.jsp.tags.validators.ValidatableAdapter
      extended byweblogicx.jsp.tags.validators.ValidatableTagAdapter
          extended byweblogicx.jsp.tags.validators.CustomValidator
All Implemented Interfaces:
BodyTag, IterationTag, JspTag, Serializable, Tag, Validatable

public class CustomValidator
extends ValidatableTagAdapter

Class implements the ValidatableTagAdapter and forms a wrapper around the Customizable classes. A Customizable Class is instantiated and method calls delegated to the particular instance.

See Also:
Serialized Form
Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Field Summary
 
Fields inherited from class weblogicx.jsp.tags.validators.ValidatableTagAdapter
bodyContent, pageContext, parent
 
Fields inherited from class weblogicx.jsp.tags.validators.ValidatableAdapter
errorMessage, fieldToValidate, isValid
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields inherited from interface weblogicx.jsp.tags.validators.Validatable
ENCODED_SEPERATOR, SEPERATOR
 
Constructor Summary
CustomValidator()
           
 
Method Summary
 Validatable decodeHiddenField(String stToDecode)
           
 boolean equals(Object o)
           
 String getExpression()
           
 String getValidatorClass()
           
 void instantiateCustomClass(String className)
          instantiates the custom class
 void release()
           
 void setExpression(String exp)
           
 void setValidatorClass(String vclass)
           
 boolean userExit()
          This acts as an User Exit...
 boolean validate(ServletRequest req)
          abstract class to be implemented
 String writeHiddenField()
          write a hidden input type e.g.
 
Methods inherited from class weblogicx.jsp.tags.validators.ValidatableTagAdapter
doAfterBody, doEndTag, doInitBody, doStartTag, getHiddenField, getParent, setBodyContent, setPageContext, setParent
 
Methods inherited from class weblogicx.jsp.tags.validators.ValidatableAdapter
defaultDecodeHiddenField, defaultWriteHiddenField, getErrorMessage, getFieldToValidate, isValid, setErrorMessage, setFieldToValidate, setIsValid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomValidator

public CustomValidator()
Method Detail

decodeHiddenField

public Validatable decodeHiddenField(String stToDecode)
                              throws Exception
Description copied from interface: Validatable
given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.

Specified by:
decodeHiddenField in interface Validatable
Overrides:
decodeHiddenField in class ValidatableAdapter
Throws:
Exception

equals

public boolean equals(Object o)

getExpression

public String getExpression()

getValidatorClass

public String getValidatorClass()

instantiateCustomClass

public void instantiateCustomClass(String className)
                            throws ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException,
                                   UnImplementedException
instantiates the custom class

Parameters:
className - to be instantiated
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
UnImplementedException

release

public void release()
Specified by:
release in interface Tag
Overrides:
release in class ValidatableTagAdapter

setExpression

public void setExpression(String exp)

setValidatorClass

public void setValidatorClass(String vclass)

userExit

public boolean userExit()
                 throws JspException
Description copied from class: ValidatableTagAdapter
This acts as an User Exit... This Class guarantees that this method will be called in the doStartTag method.

Specified by:
userExit in class ValidatableTagAdapter
Returns:
boolean which says whether the user exit was successful or not. true --> EVAL_BODY_TAG false --> SKIP_BODY
Throws:
JspException

validate

public boolean validate(ServletRequest req)
                 throws Exception
Description copied from class: ValidatableAdapter
abstract class to be implemented

Specified by:
validate in interface Validatable
Specified by:
validate in class ValidatableAdapter
Throws:
Exception

writeHiddenField

public String writeHiddenField()
Description copied from interface: Validatable
write a hidden input type e.g. className=classImplementingValidatable+ENCODED_SEPERATOR+ fieldToValidate=somefield+ENCODED_SEPERATOR+expression=someexpr +ENCODED_SEPERATOR+errorMessage

Specified by:
writeHiddenField in interface Validatable
Overrides:
writeHiddenField in class ValidatableAdapter

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.