tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/168-how-to-get-multiple-mediators-to-respond-to-a-single-eventRobotlegs: Discussion 2018-10-18T16:35:12Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/17294952010-05-19T15:55:30Z2010-05-19T15:55:30ZHow to get multiple mediators to respond to a single event<div><p>Your custom event needs to override clone(). You can't relay
events unless you do so. If you don't it clones a vanilla
event.</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/17294952010-05-19T16:02:28Z2010-05-19T16:02:30ZHow to get multiple mediators to respond to a single event<div><p>Joel,</p>
<p>thanks.</p>
<p>However, looks like a case of DBD (Developer Brain Damage). I've
only got two mediators/views so far that need this event. The
second view one wasn't being instantiated so there was no mediator
to listen for the event. All is good now. I will keep note of the
clone requirement.<br></p>
<p>But what is normal behaviour - should all mediators listening
for an event "hear" it (what seems to be happening now) or is
normal behaivour something different?</p></div>matthias.howelltag:robotlegs.tenderapp.com,2009-10-18:Comment/17294952010-05-19T17:13:06Z2010-05-19T17:13:06ZHow to get multiple mediators to respond to a single event<div><p>All mediators (and actors and commands) are injected with the
same EventDispatcher instance, so they can choose to subscribe to
the same events if they wish.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/17294952010-05-29T15:59:15Z2010-05-29T15:59:16ZHow to get multiple mediators to respond to a single event<div><p>So it seems that normal behaviour is for every method listening
for an event will get called when that event is fired.</p></div>matthias.howell