Package org.zkoss.zk.ui.event

## Class ErrorEvent

- java.lang.Object
- - org.zkoss.zk.ui.event.Event
  - - org.zkoss.zk.ui.event.InputEvent
    - - org.zkoss.zk.ui.event.ErrorEvent

- All Implemented Interfaces:
    `java.io.Serializable`

      public class ErrorEvent
      extends InputEvent

  Represents an event cause by user's entering a wrong data or clearing the last wrong data.
  Author:
    tomyeh
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ErrorEvent​(java.lang.String name, Component target, java.lang.String val, java.lang.Object oldValue, java.lang.String msg)` | Constructs an error-relevant event.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static ErrorEvent` | `getErrorEvent​(AuRequest request, java.lang.Object oldValue)` | Converts an AU request to an error event.
    `java.lang.String` | `getMessage()` | Returns the error message if this event is caused by a wrong data, or null if it is to clear message.

    - ### Methods inherited from class org.zkoss.zk.ui.event.InputEvent

      `getInputEvent, getPreviousValue, getStart, getValue, isChangingBySelectBack`

    - ### Methods inherited from class org.zkoss.zk.ui.event.Event

      `getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ErrorEvent

          public ErrorEvent​(java.lang.String name,
                            Component target,
                            java.lang.String val,
                            java.lang.Object oldValue,
                            java.lang.String msg)

      Constructs an error-relevant event.
      Parameters:
        `name` - the name of the event
        `target` - the component to receive this event, or null to indicate broadcasting the event to all root components.
        `val` - the new value that caused the error
        `oldValue` - the previous value.
        `msg` - the error message if not null. If null, it means the error (notified by previous `ErrorEvent`) is cleared.
      Since:
        5.0.4

  - ### Method Detail

    - #### getErrorEvent

          public static final ErrorEvent getErrorEvent​(AuRequest request,
                                                       java.lang.Object oldValue)

      Converts an AU request to an error event.
      Since:
        5.0.4

    - #### getMessage

          public final java.lang.String getMessage()

      Returns the error message if this event is caused by a wrong data, or null if it is to clear message.