Package | com.asfusion.mate.core |
Class | public class EventMap |
Inheritance | EventMap ![]() |
Implements | IDispatcherProvider, mx.core.IMXMLObject |
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 | ||
---|---|---|---|
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 | ||
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 | ||
---|---|---|---|
currentDispatcher : IEventDispatcher
Local storage for the current dispatcher.
| EventMap | ||
document : Object
A reference to the document object associated with this EventMap.
| EventMap |
Method | Defined by | ||
---|---|---|---|
getCached(template:Class):*
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 |
currentDispatcher | property |
protected var currentDispatcher:IEventDispatcher
Local storage for the current dispatcher. This object can be accessed by calling getDispatcher method
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:Object
A 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
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, InjectorHandlers
ServiceScope
for ServiceHandlers
MessageScope
for MessageHandlers
This property can be used as the source for data binding.
Implementation public function get scope():*
See also
getCached | () | method |
public function getCached(template:Class):*
Function to get cached instances from the framework. A Cache is returned instead of actual instance.
Parameterstemplate:Class |
* |
See also
getDispatcher | () | method |
public function getDispatcher():IEventDispatcher
Returns an event dispatcher.
ReturnsIEventDispatcher |
initialized | () | method |
public function initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the EventMap is set up using a tag.
Parametersdocument:Object |
|
id:String |