(This tag must be placed inside a <Dispatcher> tag)
This tag has been deprecated, please use CallBack instead.
The ResponseHandler tag can be used to receive a response from an event that was dispatched from a dispatcher instance. After dispatching an event using the Dispatcher tag, the view that dispatched this event can receive a response. Those responses are sent from the EventMap within the EventHandlers block that was listening for the event dispatched by the Dispatcher.
It's important to note that this response will be received only by the view instance that dispatched the event, even if there are other instances of the same view or other views dispatch the same event.
<mate:Dispatcher>
<mate:ResponseHandler type="searchCustomerResult" response="onSearchResultReceived(event.mySearchResult)" />
</mate:Dispatcher>
Responses are handled by either the response event handler or by the method attribute. The response event handler allows you to write inline code. If you use the method attribute, you must implement a method that receives an event (either a custom event or a DynamicEvent).
Attributes
type
Type of the event that this ResponseHandler is listening to. This type needs to match the ResponseAnnouncer type defined in the ListenerSequence in the EventMap.
response
either response or method must be specified
Event handler that receives the "response". The event received is triggered by a ResponseAnnouncer created in the EventMap. This event will contain any properties set in the ResponseAnnouncer by using the Properties tag.
method
either response or method must be specified
Method that will handle the response event. It must accept a custom event (or Event that can be casted within the method) or a DynamicEvent.
I'm confuse. what do you mind with "please use Callback instead"?
Thanks!
I just added CallBack to the documentation.