Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogicx.jsp.tags.validators
Class ValidatableAdapter

    java.lang.Object
      weblogicx.jsp.tags.validators.ValidatableAdapter

All Implemented Interfaces:
  Serializable, Validatable

Direct Known Subclasses:
  ValidatableTagAdapter

    public abstract class ValidatableAdapter

extends Object
implements Validatable, Serializable

See Also:
  Serialized Form

Field Summary
`protected String` | `errorMessage`
`protected String` | `fieldToValidate`
`protected boolean` | `isValid`

Fields inherited from interface weblogicx.jsp.tags.validators.Validatable
`ENCODED_SEPERATOR, SEPERATOR`

Constructor Summary
`ValidatableAdapter()`

Method Summary
`Validatable` | `decodeHiddenField(String stToDecode)` given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.
`Hashtable` | `defaultDecodeHiddenField(String value)`
`String` | `defaultWriteHiddenField(Hashtable ht)`
`String` | `getErrorMessage()`
`String` | `getFieldToValidate()`
`boolean` | `isValid()` returns whether the validation was successful
`void` | `setErrorMessage(String error)`
`void` | `setFieldToValidate(String f)`
`void` | `setIsValid(boolean bo)` set whether the particular validator was successful or not
`abstract boolean` | `validate(ServletRequest request)` abstract class to be implemented
`String` | `writeHiddenField()` write a hidden input type e.g.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fieldToValidate

    protected String fieldToValidate

### errorMessage

    protected String errorMessage

### isValid

    protected boolean isValid

Constructor Detail

### ValidatableAdapter

    public ValidatableAdapter()

Method Detail

### isValid

    public boolean isValid()

  Description copied from interface: `Validatable`
  returns whether the validation was successful

  Specified by:
    `isValid` in interface `Validatable`

### setIsValid

    public void setIsValid(boolean bo)

  Description copied from interface: `Validatable`
  set whether the particular validator was successful or not

  Specified by:
    `setIsValid` in interface `Validatable`

### getErrorMessage

    public String getErrorMessage()

  Specified by:
    `getErrorMessage` in interface `Validatable`
  Returns:
    errorMessage

### getFieldToValidate

    public String getFieldToValidate()

  Specified by:
    `getFieldToValidate` in interface `Validatable`
  Returns:
    fieldToValidate

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

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

### validate

    public abstract boolean validate(ServletRequest request)
                              throws Exception

  abstract class to be implemented

  Specified by:
    `validate` in interface `Validatable`
  Throws:
    `Exception`

### setFieldToValidate

    public void setFieldToValidate(String f)

### setErrorMessage

    public void setErrorMessage(String error)

### defaultWriteHiddenField

    public String defaultWriteHiddenField(Hashtable ht)

  Parameters:
    `ht` - containing all the names and values other than errorMessage and fieldToValidate.

### defaultDecodeHiddenField

    public Hashtable defaultDecodeHiddenField(String value)

  Parameters:
    `the` - string containing the encoded hidden field
  Returns:
    hashtable containing the name value pairs from the hidden field values. example name: fieldToValidate value: username name: foo value: bar

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, 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.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD