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

## org.apache.struts.util
Class ErrorMessages

    java.lang.Object
      |
      +--org.apache.struts.util.ErrorMessages

Deprecated. Use org.apache.struts.action.ActionErrors instead

public class ErrorMessages
extends java.lang.Object

Utility class that is useful for accumulating error message keys in action classes or validation methods. Use this class as follows:

- At the beginning of your action class or validation method, instantiate an instance of this class in a local variable.
- Whenever you wish to add a new error message key, call the `addError()` method to add it.
- To return the String array of error message keys required by other Struts components, call `getErrors()`.

Author:
  David Geary

Field Summary
`private java.util.Vector` | `errors` Deprecated. The accumulated set of error message keys.

Constructor Summary
`ErrorMessages()` Deprecated.

Method Summary
`void` | `addError(java.lang.String key)` Deprecated. Add an error message key to the accumulated set of errors.
`java.lang.String` | `getError(int index)` Deprecated. Return the error message key at the specified zero-relative index.
`java.lang.String[]` | `getErrors()` Deprecated. Return the set of error message keys we have accumulated.
`int` | `getSize()` Deprecated. Return the number of error message keys we have accumulated so far.

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

Field Detail

### errors

    private java.util.Vector errors

  Deprecated.
  The accumulated set of error message keys.

Constructor Detail

### ErrorMessages

    public ErrorMessages()

  Deprecated.

Method Detail

### addError

    public void addError(java.lang.String key)

  Deprecated.
  Add an error message key to the accumulated set of errors.
  Parameters:
    `key` - The error message key to be added

### getError

    public java.lang.String getError(int index)

  Deprecated.
  Return the error message key at the specified zero-relative index.
  Parameters:
    `index` - Zero-relative index of the error message key to return

### getErrors

    public java.lang.String[] getErrors()

  Deprecated.
  Return the set of error message keys we have accumulated.

### getSize

    public int getSize()

  Deprecated.
  Return the number of error message keys we have accumulated so far.

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

Copyright © 2000-2001 - Apache Software Foundation