HOME> How to respond to close and open events for tiles within the Composite Application Framework (Mosaic)

How to respond to close and open events for tiles within the Composite Application Framework (Mosaic)

Within the Composite Application Framework, responding to the closing of tiles can be problematic. A tile can detect its own closing. Problems arise if the tile attempts to notify other parts of the program that it is closing through calls to shared services or changing global values. Before the tile can dispatch Mosaic events to other tiles it is closed.

Underlying Mosaic is the Client Component Framework (Gravity). Gravity is an OSGi-inspired framework that allows for plugins or modules to be added and removed to Flash applications. When a tile closes, the Gravity BundleEvent.BUNDLE_UNINSTALLED event is dispatched.

Here is an example snippet passed to me that shows how to listen for Gravity-oriented events: