PureMVC Framework for haXe: API Documentation
Back | Index
class org.puremvc.haxe.patterns.mediator.Mediator
extends org.puremvc.haxe.patterns.observer.Notifier
implements org.puremvc.haxe.interfaces.IMediator
A base IMediator implementation.
function new(?mediatorName : String, ?viewComponent : Dynamic) : Void
Constructor.
function getMediatorName() : String
Get the name of the Mediator.

Override in subclass!

function getViewComponent() : Dynamic
Get the Mediator's view component.
function handleNotification(notification : org.puremvc.haxe.interfaces.INotification) : Void

Handle INotifications.

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

function listNotificationInterests() : Array<String>
List the INotification names this Mediator is interested in being notified of.
function onRegister() : Void
Called by the View when the Mediator is registered
function onRemove() : Void
Called by the View when the Mediator is removed
function setViewComponent(viewComponent : Dynamic) : Void
Set the IMediator's view component.
static var NAME : String

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.

Back | Index