Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06

weblogicx.jsp.tags.validators
Interface Validatable

All Known Implementing Classes:
CustomValidator, ValidatableAdapter, ValidatableTagAdapter

public interface Validatable

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


Field Summary
static String ENCODED_SEPERATOR
          string denoting the hidden field's encoded seperator
static 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(String stringToDecode)
          given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.
 String getErrorMessage()
           
 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(ServletRequest req)
          validate method where all the logic for validation lies.
 String writeHiddenField()
          write a hidden input type e.g.
 

Field Detail

ENCODED_SEPERATOR

static final String ENCODED_SEPERATOR
string denoting the hidden field's encoded seperator

See Also:
Constant Field Values

SEPERATOR

static final String SEPERATOR
string denoting the "read" seperator for reading the parameter from the request and translating it back into a Validatable object

See Also:
Constant Field Values
Method Detail

setIsValid

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


isValid

boolean isValid()
returns whether the validation was successful


validate

boolean validate(ServletRequest req)
                 throws Exception
validate method where all the logic for validation lies.

Throws:
Exception

getFieldToValidate

String getFieldToValidate()
Returns:
fieldToValidate

getErrorMessage

String getErrorMessage()
Returns:
errorMessage

writeHiddenField

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


decodeHiddenField

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

Parameters:
stringToDecode - the string to decode
Throws:
Exception

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06