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:

  1. Open an artifact's Event Listeners tab, then click + Event Listener.
  2. In the Create Event Listener wizard, select the event you want to trigger an action chain. Depending on where you're creating the listener, your list might include page events, flow events, and application events, in addition to lifecycle events.
  3. Click Next.
  4. Select the action chain you want to trigger, or create a new action chain which you can edit later.


    While an event listener can trigger multiple action chains, you can add only one action chain at a time in the wizard.

  5. Click Finish.

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 vbEnterChangeListener is created under Event Listeners.

To edit an action chain associated with an event listener, move your cursor over the name of an action chain, then click Go to Action Chain to open the action chain in the Action Chains editor.
Description of gotoactionchain.png follows
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, then click Add Action Chain to relaunch the Create Event Listener wizard.
Description of addactionchain.png follows
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 in the list in the Event Listeners tab, then click Delete from the options 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 delete-event-listener.png follows
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.