accessing event payload in a command
Hi,
How can I access a event payload/value object in a command that is
mapped to a event in the contextView? My service has returned some
data, stored it as a value object, that is dispatched with a
event.
How can I access this event value object in the mapped command?
Stephen
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Stray on Jun 11, 2010 @ 02:31 PM
Hi Stephen,
you might find some value in checking out the examples because it might be quicker than asking here, but this one is simple.
If you've mapped SomeEvent.THING to your command, then in your command just add:
[Inject]
public var someEvent:SomeEvent;
and then access it in the normal way. The commandMap will automagically carry out the injection when the command is triggered.
Stray
stephenadams1 closed this discussion on Jun 14, 2010 @ 10:15 AM.