Event Listeners and Actions
Actions are always inserted in the context of an Event Listener object. If an event of a certain type takes place, for example if a user clicks a button, one or more USoft actions can be performed.
However, if you attach multiple actions to an event listener, the second and subsequent actions will be performed regardless of whether the first action was successful. Therefore, do NOT attach actions such as commit() or navigateTo() to the same event listener (for example to create a Next button). If the commit fails because of invalid data, the user will not get the chance to make any corrections and the transaction will be lost.
For your convenience, the Web Designer catalog contains a few ready-to-use event listeners:
In previous USoft versions, the onload event was used to change the appearance of for instance a grid control after the page was loaded. Pages will be much less loaded with Ajax technology. Therefore, the ongetdataset event listener has been introduced.
The USoft-specific ongetdataset event listener is context sensitive. If this event listener is related to the Table Data Source object, it is triggered only in the case of a getdataset event within this specific Data Source object. In all other cases, it is triggered on any getDataSet event of any non-virtual table Data source objects. Placing the event handler at the page level will trigger the event for all data sources on the page. Placing the event handler inside a table data source it will trigger only for that data source. This event type is triggered after an automatic getdataset (selecting next page from the recordsetposition control) or after an explicit getNextDataSet function call. This event is only triggered when actual data is retrieved from the server, not when it is retrieved from the client cache.
The USoft-specific afterlogin event type is triggered after the login action has completed and is only valid on the page where the login action is executed.