Lion has been designed in order to be able to support not just HTML but whatever kind of user interface.
In that sense, event types depend on the interface nature that we are working with.
We can talk about 2 different event types:
DOM Level 2 Events: Raised by HTML based components since they are rendered as HTML elements
Lion custom events: Custom events raised by some components (i.e. the validate event raised by a validator component)
DOM Level 2 Events
DOM Level 2 events are raised by HTML based components. i.e., since a button component it's represented by a HTML button, it raises the click event defined on DOM Level 2 specification when clicked, not a custom event
The following list shows DOM Level 2 events:
Name
Definition
click
The click event occurs when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location. The sequence of these events is: mousedown, mouseup, click.
mousedown
The mousedown event occurs when the pointing device button is pressed over an element. This event is valid for most elements.
mouseup
The mousedown event occurs when the pointing device button is pressed over an element. This event is valid for most elements.
mouseover
The mouseover event occurs when the pointing device is moved onto an element. This event is valid for most elements.
mousemove
The mousemove event occurs when the pointing device is moved while it is over an element. This event is valid for most elements.
mouseout
The mouseout event occurs when the pointing device is moved away from an element. This event is valid for most elements.
load
The load event occurs when the DOM implementation finishes loading all content within a document, all frames within a FRAMESET, or an OBJECT element.
unload
The unload event occurs when the DOM implementation removes a document from a window or frame. This event is valid for BODY and FRAMESET elements.
abort
The abort event occurs when page loading is stopped before an image has been allowed to completely load. This event applies to OBJECT elements.
error
The error event occurs when an image does not load properly or when an error occurs during script execution. This event is valid for OBJECT elements, BODY elements, and FRAMESET element.
select
The select event occurs when a user selects some text in a text field. This event is valid for INPUT and TEXTAREA elements.
change
The change event occurs when a control loses the input focus and its value has been modified since gaining focus. This event is valid for INPUT, SELECT, and TEXTAREA. element.
submit
The submit event occurs when a form is submitted. This event only applies to the FORM element.
reset
The reset event occurs when a form is reset. This event only applies to the FORM element.
focus
The focus event occurs when an element receives focus either via a pointing device or by tabbing navigation. This event is valid for the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.
blur
The blur event occurs when an element loses focus either via the pointing device or by tabbing navigation. This event is valid for the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.
resize
The resize event occurs when a document view is resized.
scroll
The scroll event occurs when a document view is scrolled.
Not all the components are able to raise all the events. So, is a developer task to ensure that a concrete component is able to raise a concrete event.
Lion Custom Events
Lion also support the execution of custom events, raised from the client by components and handled by the server.
Those events depend on the component but not on how components are rendered as HTML elements.
i.e., a validator component raises a validate event in case a validation method has been defined in an event handler. However, this event is a custom event designed just for that purpose.