Versions Compared

Key

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

...

Code Block
ViewController viewContext.getViewController();
Registering Listeners

A view can register to listen for view events from 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.

https://github.com/apache/ambari/blob/trunk/ambari-views/src/main/java/org/apache/ambari/view/events/Listener.java

Firing Events
  1. Create an event.
    http://github.com/apache/ambari/blob/trunk/ambari-views/src/main/java/org/apache/ambari/view/events/Event.java

  2. Fire the event.
    controller.fireEvent(event)
Receiving Events

The framework will notify all registered listeners.

...