| Package | com.asfusion.mate.core |
| Class | public class EventMap |
| Inheritance | EventMap flash.events.EventDispatcher |
| Implements | IEventMap, mx.core.IMXMLObject |
| Subclasses | LocalEventMap |
EventMap tag which allows you define mappings for the events that your application creates.
It is basically a list of IActionList blocks, where each block matches an event type (if the block is an EventHandlers).
<EventMap
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:mate="http://mate.asfusion.com/">
<EventHandlers type="myEventType">
... here what you want to happen when this event is dispatched...
</EventHandlers>
</EventMap>
| Property | Defined by | ||
|---|---|---|---|
| cache : String
String that indicates whether the event maps will use a global or a local cache.
| EventMap | ||
| currentEvent : * [read-only]
It refers to the currentEvent that made the action-list (or inner-action-list) execute.
| EventMap | ||
| data : * [read-only]
Every
IActionList contains a placeholder object called data. | EventMap | ||
| event : * [read-only]
It refers to the event that made the
EventHandlers execute. | EventMap | ||
| fault : * [read-only]
It refers to the fault returned by a service that made the inner-action-list (
faultHandlers) execute. | EventMap | ||
| globalDispatcher : IEventDispatcher [read-only]
| EventMap | ||
| lastReturn : * [read-only]
lastReturn is always available, although its value might be
null. | EventMap | ||
| message : * [read-only]
It refers to the message received that made the
MessageHandlers execute. | EventMap | ||
| resultObject : * [read-only]
It refers to the result returned by a service that made the inner-action-list (
resultHandlers) execute. | EventMap | ||
| scope : * [read-only]
It refers to the
scope of the IActionList. | EventMap | ||
| Property | Defined by | ||
|---|---|---|---|
| _cache : String = "global" | EventMap | ||
| cacheCollection : Dictionary | EventMap | ||
| document : Object
A reference to the document object associated with this EventMap.
| EventMap | ||
| Method | Defined by | ||
|---|---|---|---|
|
getCacheCollection():Dictionary
Method that returns of the local cache dictionary that will be used to store objects
created by the mate framework.
| EventMap | ||
|
getCached(template:Class, cacheType:String, autoCreate:Boolean = true, registerTarget:Boolean = false, constructorArguments:Array = null):*
Function to get cached instances from the framework.
| EventMap | ||
|
getDispatcher():IEventDispatcher
Returns an event dispatcher.
| EventMap | ||
|
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the EventMap is set up using a tag.
| EventMap | ||
| _cache | property |
protected var _cache:String = "global"
| cache | property |
cache:String [read-write]String that indicates whether the event maps will use a global or a local cache. Each individual tag (ex: ObjectBuilder) is using this setting by default. Their default is inherit, which means that it will use the value that is defined in the event map. But each tag can override that to local, global or none.
Implementation public function get cache():String
public function set cache(value:String):void
| cacheCollection | property |
protected var cacheCollection:Dictionary
| currentEvent | property |
currentEvent:* [read-only]
It refers to the currentEvent that made the action-list (or inner-action-list) execute.
Inside the inner-action-list this property has the value of the current event while event has the
value of the original event of the main action-list.
The currentEvent itself or properties of the event can be used as arguments of MethodInvoker
methods, service methods, properties of all the IAction, etc.
This property can be used as the source for data binding.
Implementation public function get currentEvent():*
See also
| data | property |
data:* [read-only]
Every IActionList contains a placeholder object called data.
This object can be used to store temporary data that many tags in the IActionList can share.
This property can be used as the source for data binding.
Implementation public function get data():*
See also
| document | property |
protected var document:ObjectA reference to the document object associated with this EventMap. A document object is an Object at the top of the hierarchy of a Flex application, MXML component, or AS component.
| event | property |
event:* [read-only]
It refers to the event that made the EventHandlers execute. The event itself or properties of the event
can be used as arguments of MethodInvoker methods, service methods, properties of all the IAction, etc.
This property can be used as the source for data binding.
Implementation public function get event():*
See also
| fault | property |
fault:* [read-only]
It refers to the fault returned by a service that made the inner-action-list (faultHandlers) execute.
The fault itself or properties of the fault can be used as arguments of MethodInvoker
methods, service methods, properties of all the IAction, etc.
Available only inside a faultHandlers inner tag.
This property can be used as the source for data binding.
Implementation public function get fault():*
See also
| globalDispatcher | property |
globalDispatcher:IEventDispatcher [read-only]Implementation
public function get globalDispatcher():IEventDispatcher
| lastReturn | property |
lastReturn:* [read-only]
lastReturn is always available, although its value might be null.
It typically represents the value returned by a method call made on a MethodInvoker,
but other IActions might also return a value, such as:
token: returned by RemoteObjectInvoker,
WebServiceInvoker and HTTPServiceInvoker (value is returned before call result is received)Boolean value: returned by EventAnnouncer after dispatching the event. True for successful dispatch,
false for unsuccessful (either a failure or when preventDefault() was called on the event).This property can be used as the source for data binding.
Implementation public function get lastReturn():*
See also
| message | property |
message:* [read-only]
It refers to the message received that made the MessageHandlers execute.
The message itself or properties of the message can be used as arguments of
MethodInvoker methods, service methods, properties of all the IActions, etc.
Available only inside a MessageHandlers tag.
This property can be used as the source for data binding.
Implementation public function get message():*
See also
| resultObject | property |
resultObject:* [read-only]
It refers to the result returned by a service that made the inner-action-list (resultHandlers) execute.
The result itself or properties of the result can be used as arguments of MethodInvoker
methods, service methods, properties of all the IAction, etc.
Available only inside a resultHandlers inner tag.
This property can be used as the source for data binding.
Implementation public function get resultObject():*
See also
| scope | property |
scope:* [read-only]
It refers to the scope of the IActionList.
The type of the scope is depending the type of IActionList.
Available types are:
Scope for EventHandlers, InjectorHandlersServiceScope for ServiceHandlersMessageScope for MessageHandlersThis property can be used as the source for data binding.
Implementation public function get scope():*
See also
| getCacheCollection | () | method |
public function getCacheCollection():DictionaryMethod that returns of the local cache dictionary that will be used to store objects created by the mate framework.
ReturnsDictionary |
| getCached | () | method |
public function getCached(template:Class, cacheType:String, autoCreate:Boolean = true, registerTarget:Boolean = false, constructorArguments:Array = null):*Function to get cached instances from the framework. A Cache is returned instead of actual instance.
Parameterstemplate:Class |
|
cacheType:String |
|
autoCreate:Boolean (default = true) |
|
registerTarget:Boolean (default = false) |
|
constructorArguments:Array (default = null) |
* |
See also
| getDispatcher | () | method |
public function getDispatcher():IEventDispatcherReturns an event dispatcher.
ReturnsIEventDispatcher |
| initialized | () | method |
public function initialized(document:Object, id:String):voidCalled automatically by the MXML compiler if the EventMap is set up using a tag.
Parametersdocument:Object |
|
id:String |