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

## BEA WebLogic Server 9.0 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.

  Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

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

    public static final String ENCODED_SEPERATOR

  string denoting the hidden field's encoded seperator

  See Also:
    Constant Field Values

### SEPERATOR

    public 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

### decodeHiddenField

    public Validatable decodeHiddenField(String stringToDecode)
                                  throws Exception

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

  Throws:
    `Exception`

### getErrorMessage

    public String getErrorMessage()

  Returns:
    errorMessage

### getFieldToValidate

    public String getFieldToValidate()

  Returns:
    fieldToValidate

### isValid

    public boolean isValid()

  returns whether the validation was successful

### setIsValid

    public void setIsValid(boolean b)

  set whether the particular validator was successful or not

### validate

    public boolean validate(ServletRequest req)
                     throws Exception

  validate method where all the logic for validation lies.

  Throws:
    `Exception`

### writeHiddenField

    public String writeHiddenField()

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

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