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

## 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.

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

Field Detail

### ENCODED_SEPERATOR

    public static final java.lang.String ENCODED_SEPERATOR

  string denoting the hidden field's encoded seperator

### SEPERATOR

    public static final java.lang.String SEPERATOR

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

Method Detail

### setIsValid

    public void setIsValid(boolean b)

  set whether the particular validator was successful or not

### isValid

    public boolean isValid()

  returns whether the validation was successful

### validate

    public boolean validate(javax.servlet.ServletRequest req)
                     throws java.lang.Exception

  validate method where all the logic for validation lies.

### getFieldToValidate

    public java.lang.String getFieldToValidate()

  Returns:
    fieldToValidate

### getErrorMessage

    public java.lang.String getErrorMessage()

  Returns:
    errorMessage

### writeHiddenField

    public java.lang.String writeHiddenField()

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

### decodeHiddenField

    public Validatable decodeHiddenField(java.lang.String stringToDecode)
                                  throws java.lang.Exception

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

  Parameters:
    `string` - to decode

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference