Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
    `string` - to decode
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD