Create Event Listeners for Events
When an event (such as a button click) occurs in a page, it can start one or more action chains if an event listener is "listening" for it. To create an event listener, you select the event it should listen for and the action chain you want it to trigger. You can create event listeners for custom events as well as for predefined lifecyle events.
An action chain can be started by multiple event listeners, so you might have a SaveData
action chain that can be started by two different event listeners listening for two different events.
To create a listener for an event and associate it with an action chain:
Tip:
If you're working with an existing custom event on the Events tab, you can create event listeners directly from there. Simply right-click the custom event and click Create Event Listener to create an event listener, called(eventId)Listener
, in the same scope as the event. Note that this option isn't available for custom events that fire to containers.
If you chose to create a new action chain, look for the associated event listener, typically prefixed with the event you chose. For example, if you selected vbEnter as the event, a new event listener called vbEnterListener is created under Event Listeners.
To edit an action chain associated with an event listener, move your cursor over the action chain (or select it), then click Go to Action Chain to open the action chain in the Action Chains editor.
Description of the illustration gotoactionchain.png
You can add additional action chains to an event listener any time you want. Simply move your cursor over the event name (or select it), then click Add Action Chain to relaunch the Create Event Listener wizard.
Description of the illustration addactionchain.png
If you want to delete an event listener, or remove an action chain triggered by an event listener, select it and click Delete from the Actions menu in the Properties pane. Deleting an action chain in the Event Listeners tab means it will no longer be triggered by the listener, but it won't delete the actual action chain.
Description of the illustration delete-event-listener.png
Note:
A page-level or component event listener includes a Show in Flow Diagram property to surface the listener in the Flow Diagram, allowing you to create action chains that bind to an existing event listener. See Bind an Action Chain in the Flow Diagram to an Existing Event Listener.