tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/162-can-you-pass-event-properties-to-commandsRobotlegs: Discussion 2018-10-18T16:35:12Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/16796002010-05-13T19:42:45Z2010-05-13T19:42:45ZCan you pass event properties to commands?<div><p>Ok, I found this:<br>
<a href=
"http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/how-are-commands-triggered-in-mvcs-implementation">
http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/h...</a></p>
<p>The question changes to:<br>
Is the injection of the event automatic or do I have to wire it
up?</p></div>johncblandiitag:robotlegs.tenderapp.com,2009-10-18:Comment/16796002010-05-13T19:48:35Z2010-05-13T19:48:35ZCan you pass event properties to commands?<div><p>You need to add the injection. RL doesn't have any knowledge of
your injection type. Which is only sort of true, but ya, you need
to add it.</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/16796002010-05-13T20:11:56Z2010-05-13T20:11:56ZCan you pass event properties to commands?<div><p>So, by dispatching an event (normal dispatchEvent), it will
automagically know this event goes into <em>this</em> command
because it is of <em>that</em> type?</p></div>johncblandiitag:robotlegs.tenderapp.com,2009-10-18:Comment/16796002010-05-13T20:32:21Z2010-05-13T20:32:21ZCan you pass event properties to commands?<div><p>yup.</p>
<p>It gets mapped, the command is instantiated (and injected), and
then the event is unmapped. All in the blink of an eye.</p></div>Straytag:robotlegs.tenderapp.com,2009-10-18:Comment/16796002010-05-14T03:09:16Z2010-05-14T03:09:16ZCan you pass event properties to commands?<div><p>All so very nice. Great work RL team.</p></div>johncblandii