Pluggable View Classes: Triggering and Handling Events
Pluggable views may be used in basic apps with other views. Apps, in turn, may be used by themselves or included in workspace apps with other apps. Views may have events that occur to view elements which they must handle, but may also be of interest to other views or apps in different contexts. In turn, views may also be interested in events from other views or apps.
Note: This topic discusses specific aspects of how to implement pluggable view classes. For the basic implementation techniques, see
Implement a Pluggable View Class.
To support inter-view communication, pluggable views can use their DataTable. The DataTable tracks row selection state for the results in the DataTable across all views that use that DataTable and also supports both firing and listening for row selection events.
Apps may also leverage view events and communication to provide inter-app communication through the MashZone NextGen App Framework. The MashZone NextGen App Framework supports publishing and subscribing to events (called topics) across apps.
Thus, pluggable views can choose to support two general categories of events:
View-specific events typically based on common browser events such as click for elements in the view.
Supporting DataTable events allows pluggable views to participate in row selection synchronization in basic apps. Virtually all MashZone NextGen built-in views participate in this synchronization where row selection in one view is automatically reflected in all other views, as appropriate, within a basic app.
DataTable row selection events are also highly useful for users to wire interactions in workspaces because these events include the data of the entire row, not just those columns included in the view.