Class ErrorList

java.lang.Object
com.randomnoun.common.ErrorList
All Implemented Interfaces:
Serializable, Iterable<ErrorList.ErrorData>, Collection<ErrorList.ErrorData>, List<ErrorList.ErrorData>, SequencedCollection<ErrorList.ErrorData>

public class ErrorList extends Object implements List<ErrorList.ErrorData>, Serializable
The ErrorList class is a a fairly generic class for containing validation errors for input forms, similar to the struts ActionErrors class.

Each error within this class can contain a 'short' and 'long' description, where the short description is normally two-word categorisation of the error and the longer description describes what has happened and how to fix the problem; (e.g. shortText="Missing field", longText="The field 'id' is mandatory. Please enter a value for this field.").

In the UI, the short description is normally rendered in bold before the long description.

An individual error also may contain a severity, and list of fields that it applies to (defined by a comma-separate string of field names) An error without a severity supplied is assumed to be SEVERITY_INVALID, and an error without any fields supplied is assumed to be associated with the entire form, rather than a specific set of fields.

Errors are inserted into an ErrorList by using one of the addError methods:

Author:
knoxg
See Also: