Packageorg.mvcexpress.base
Classpublic class FlexMediatorMap
InheritanceFlexMediatorMap Inheritance MediatorMap Inheritance Object

Handles flex application mediators. FlexMediatorMap acts a bit differently from MediatorMap. Flex Mediators are not registered until "creationComplete" event is sent. This is needed because Flex view objects acts diferently then simple AS3 display objects - Flex object can be created in next frames. It is common for flex objects to be completed not in the order they were created. Keep this in mind then mediating flex objects.



Protected Properties
 PropertyDefined By
 InheritedclassRegistry : Dictionary
MediatorMap
 InheritedmediatorRegistry : Dictionary
MediatorMap
 Inheritedmessenger : Messenger
MediatorMap
 InheritedproxyMap : ProxyMap
MediatorMap
Public Methods
 MethodDefined By
  
FlexMediatorMap(messenger:Messenger, proxyMap:ProxyMap, uiComponentClass:Class)
FlexMediatorMap
 Inherited
isMapped(viewClass:Class, mediatorClass:Class):Boolean
Checks if mediator class is mapped to view class.
MediatorMap
 Inherited
isMediated(viewObject:Object):Boolean
Checks if view object is mediated.
MediatorMap
 Inherited
listMappings():String
Returns String of all view classes that are mapped to mediator classes.
MediatorMap
 Inherited
map(viewClass:Class, mediatorClass:Class):void
Maps mediator class to view class.
MediatorMap
  
mediate(viewObject:Object):void
[override] Automatically instantiates mediator class(if mapped), handles all injections(including viewObject), and calls onRegister function.
FlexMediatorMap
 Inherited
unmap(viewClass:Class):void
Unmaps any mediator class to given view class.
MediatorMap
  
unmediate(viewObject:Object):void
[override] If any mediator is mediating viewObject: it calls onRemove, automatically removes all handler functions listening for messages from that mediator and deletes it.
FlexMediatorMap
Constructor Detail
FlexMediatorMap()Constructor
public function FlexMediatorMap(messenger:Messenger, proxyMap:ProxyMap, uiComponentClass:Class)



Parameters
messenger:Messenger
 
proxyMap:ProxyMap
 
uiComponentClass:Class
Method Detail
mediate()method
override public function mediate(viewObject:Object):void

Automatically instantiates mediator class(if mapped), handles all injections(including viewObject), and calls onRegister function. Throws error if mediator class is not mapped to viewObject class. If object is not initialized - mvcExpress will wait for 'creationComplete' to be dispatched before mediating it.

Parameters

viewObject:Object — view object to mediate.

unmediate()method 
override public function unmediate(viewObject:Object):void

If any mediator is mediating viewObject: it calls onRemove, automatically removes all handler functions listening for messages from that mediator and deletes it. If flex object is unmediated before 'creationComplete' is dispatched - nothing is done. (because mediation is not done in the first place.)

Parameters

viewObject:Object — view object witch mediator will be destroyed.