Mediator

Mediator

new Mediator()

A base Mediator implementation.

Source:
See:
  • View View

Members

(static) NAME

The name of the Mediator.

Typically, a `Mediator` will be written to serve one specific control or group controls and so, will not have a need to be dynamically named.

Source:

mediatorName

the mediator name

Source:

viewComponent

Get the Mediator's view component.

Additionally, an implicit getter will usually be defined in the subclass that casts the view object to a type, like this:

Source:

viewComponent

Set the Mediator's view component.

Source:

Methods

handleNotification(notification)

Handle Notifications.

Typically this will be handled in a switch statement, with one 'case' entry per `Notification` the `Mediator` is interested in.

Source:
Parameters:
Name Type Description
notification Notification

listNotificationInterests() → {Array.<string>}

List the Notification names this Mediator is interested in being notified of.

Source:
Returns:
Type:
Array.<string>

onRegister()

Called by the View when the Mediator is registered

Source:

onRemove()

Called by the View when the Mediator is removed

Source:

Mediator

new Mediator(mediatorName, viewComponentopt)

Constructor.

Source:
Parameters:
Name Type Attributes Default Description
mediatorName string
viewComponent Object <optional>
null

viewComponent

Members

(static) NAME

The name of the Mediator.

Typically, a `Mediator` will be written to serve one specific control or group controls and so, will not have a need to be dynamically named.

Source:

mediatorName

the mediator name

Source:

viewComponent

Get the Mediator's view component.

Additionally, an implicit getter will usually be defined in the subclass that casts the view object to a type, like this:

Source:

viewComponent

Set the Mediator's view component.

Source:

Methods

handleNotification(notification)

Handle Notifications.

Typically this will be handled in a switch statement, with one 'case' entry per `Notification` the `Mediator` is interested in.

Source:
Parameters:
Name Type Description
notification Notification

listNotificationInterests() → {Array.<string>}

List the Notification names this Mediator is interested in being notified of.

Source:
Returns:
Type:
Array.<string>

onRegister()

Called by the View when the Mediator is registered

Source:

onRemove()

Called by the View when the Mediator is removed

Source: