|
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. This section describes events that are supported by most widget components. The individual description for each component includes a list of supported common events. This event is fired when a component is hidden. Event name: hidden This event is fired when a component is shown. Event name: shown This event is fired when a component is moved within its parent container. Event name: moved This event is fired when a component is resized. Event name: resized This event is fired when a mouse button is clicked over the component. Event name: mouseClicked This event is fired when a mouse button is pressed over the component. Event name: mousePressed This event is fired when a mouse button is released over the component. Event name: mouseReleased This event is fired when a mouse cursor enters the component area. Event name: mouseEntered This event is fired when a mouse cursor leaves the component area. Event name: mouseExited This event is fired every time when a mouse cursor moves over the component area. Event name: mouseMoved This event is fired when a mouse wheel is activated over the component. Event name: mouseWheelMoved This event is fired when a keyboard key is typed while the component is in focus. Event name: keyTyped This event is fired when a keyboard key is pressed while the component is in focus. Event name: keyPressed This event is fired when a keyboard key is released while the component is in focus. Event name: keyReleased This event is fired when the component gets input focus. Event name: focusGained This event is fired when the component loses input focus. Event name: focusLost |