Packagecom.asfusion.mate.actions.builders
Classpublic class ResponseAnnouncer
InheritanceResponseAnnouncer Inheritance EventAnnouncer Inheritance ObjectBuilder Inheritance BaseAction Inheritance AbstractAction

The ResponseAnnouncer tag is placed inside a IActionList, so that when an object dispatches an event, and the list runs, this tag will allow you to send responses directly to the object that dispatched the event.

These responses are actually custom events that you need to create (if no generator class is specified, a DynamicEvent will be created).

Using the ResponseAnnouncer tag is very similar in form and purpose of the EventAnnouncer tag, with the important difference that when using the EventAnnouncer tag, all listeners of that event will be notified, whereas when using the ResponseAnnouncer tag, only the object that dispatched the original event will be notified.

The use of this tag will have no effect if the original event was not dispatched using the Dispatcher tag. Moreover, this tag will have no effect if no Response tag was added as an inner tag to the Dispatcher tag.

MXML Syntaxexpanded Hide MXML Syntax

The <ResponseAnnouncer> tag has the following tag attributes:

  <ResponseAnnouncer
   Properties
  generator="Class"
  constructorArgs="Object|Array"
  properties="Properties"
  type="String"
  bubbles="true|false"
  cancelable="true|false"
   />
  

See also

com.asfusion.mate.actions.builders.EventAnnouncer
com.asfusion.mate.actions.builders.ServiceResponseAnnouncer


Public Properties
 PropertyDefined by
 Inheritedbubbles : Boolean
Although you can specify the event's bubbles property, whether you set it to true or false will have little effect, as the event will be dispatched from the Mate Dispatcher itself.
EventAnnouncer
 Inheritedcancelable : Boolean
Indicates whether the behavior associated with the event can be prevented.
EventAnnouncer
 InheritedconstructorArguments : *
The constructorArgs allows you to pass an Object or an Array of objects to the contructor when the instance is created.
ObjectBuilder
 InheriteddispatcherType : String
String that defines whether the dispatcher used by this tag is global or inherit.
EventAnnouncer
 Inheritedgenerator : Class
The generator attribute specifies what class should be instantiated.
EventAnnouncer
 Inheritedproperties : Array
Properties allows you to add properties to the currentInstance.
BaseAction
 InheritedregisterTarget : Boolean
Registers the newly created object as an injector target.
ObjectBuilder
 Inheritedtype : String
The type attribute specifies the event type you want to dispatch.
EventAnnouncer
Protected Properties
 PropertyDefined by
 InheritedcurrentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
 Inheriteddocument : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
Public Methods
 MethodDefined by
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
 Inherited
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
 Inherited
createInstance(scope:IScope):Object
Where the currentInstance is created using the generator class as the template, passing arguments to the constructor as specified by the constructorArgs (if any).
EventAnnouncer
 Inherited
prepare(scope:IScope):void
The first method that trigger calls.
ObjectBuilder
  
run(scope:IScope):void
Where all the action occurs.
ResponseAnnouncer
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
BaseAction
Method detail
run()method
protected override function run(scope:IScope):void

Where all the action occurs. At this moment, the currentInstance is already instantiated and all the properties are already set.

Parameters
scope:IScope