Readonly
nameThe name of the mediator.
The view component associated with the mediator.
Handle an INotification
.
the INotification
to be handled
Send a INotification
.
Convenience method to prevent having to construct new notification instances in our implementation code.
The name of the notification to send.
Optional
body: anyOptional data associated with the notification.
Optional
type: stringOptional type of the notification.
IMediator
The interface definition for a PureMVCMediator
.In PureMVC,
IMediator
implementors assume these responsibilities:Implement a common method which returns a list of all
INotifications
theIMediator
has interest in.Implement a notification callback method.
Implement methods that are called when the
IMediator
is registered or removed from the View.Additionally,
IMediators
typically:Act as an intermediary between one or more view components such as text boxes or list controls, maintaining references and coordinating their behavior.
In Flash-based apps, this is often the place where event listeners are added to view components, and their handlers implemented.
Respond to and generate
INotifications
, interacting with of the rest of the PureMVC app.When an
IMediator
is registered with theIView
, theIView
will call theIMediator
'slistNotificationInterests
method. TheIMediator
will return an Array ofINotification
names which it wishes to be notified about.The
IView
will then create anObserver
object encapsulating thatIMediator
's (handleNotification
) method and register it as anObserver
for eachINotification
name returned bylistNotificationInterests
.IMediator