BEA WebLogic Server 9.0 API Reference
weblogicx.jsp.tags.validators
Class CustomValidator
java.lang.Object
weblogicx.jsp.tags.validators.ValidatableAdapter
weblogicx.jsp.tags.validators.ValidatableTagAdapter
weblogicx.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.
CustomValidator
public CustomValidator()
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