Component Events

Top  Previous  Next

Widget components may generate events when the user interacts with them. For example, a button has an action event which fires when the user clicks it.

An event may be specified as the binding activator for a binding. An "activator" causes the binding to do just that -- act, and thus write data from a widget to a context on the server, read data from a context and use it as a widget's content, or perform some other data processing.

Let's say we have a Name text field which is bound to a field in some server context's variable (i.e, the First Name of a user). Its binding also specifies an activator event -- the action event of the Save button, which is right next to it. When the user clicks this button, the following sequence of events occurs:

1) All bindings of the widget are scanned, looking for their specified Activator events.

2) The system sees that the binding for the Name text field has this action event defined as its "activator".

3) The binding is then executed, along with any other bindings which have this event as their activator (such as Last Name, if there is one). In simple words, the data in the text fields is now written into the database.

Common Events Of Components

This section describes events that are supported by most widget components. The individual description for each component includes a list of supported common events.

Hidden

This event is fired when a component is hidden.

Event name: hidden

Shown

This event is fired when a component is shown.

Event name: shown

Moved

This event is fired when a component is moved within its parent container.

Event name: moved

Resized

This event is fired when a component is resized.

Event name: resized

Mouse Clicked

This event is fired when a mouse button is clicked over the component.

Event name: mouseClicked

Mouse Pressed

This event is fired when a mouse button is pressed over the component.

Event name: mousePressed

Mouse Released

This event is fired when a mouse button is released over the component.

Event name: mouseReleased

Mouse Entered

This event is fired when a mouse cursor enters the component area.

Event name: mouseEntered

Mouse Exited

This event is fired when a mouse cursor leaves the component area.

Event name: mouseExited

Mouse Moved

This event is fired every time when a mouse cursor moves over the component area.

Event name: mouseMoved

Mouse Wheel Moved

This event is fired when a mouse wheel is activated over the component.

Event name: mouseWheelMoved

Key Typed

This event is fired when a keyboard key is typed while the component is in focus.  

Event name: keyTyped

Key Pressed

This event is fired when a keyboard key is pressed while the component is in focus.

Event name: keyPressed

Key Released

This event is fired when a keyboard key is released while the component is in focus.

Event name: keyReleased

Focus gained

This event is fired when the component gets input focus.

Event name: focusGained

Focus Lost

This event is fired when the component loses input focus.

Event name: focusLost