Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To register to receive framework events, in the view.xml, specify a <view-class>this.is.my.view-clazz</view-class> which is a class that implements the View interface.

...

Code Block
ViewController viewContext.getViewController();
Registering View Event Listeners

A view can register an event Listener from (via the ViewController) for other views by view name, or by view name + version. When an Event is fired from the source view, all registered listeners will receive the event.

Info

Typically, a view implementation will register event listeners during the onDeploy() framework event (via a <view-class>).

Firing and Receiving View Events
  1. Create an event.
    Fire the event.
    viewContext.getViewController().fireEvent(event...);

  2. The framework will notify all registered listeners. The listener implementation can process the event as appropriate.
    listener.notify(event...)