tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/871-multiple-mediators-listen-for-same-eventRobotlegs: Discussion 2012-06-21T08:07:13Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/151897312012-04-11T18:08:42Z2012-04-11T18:08:42ZMultiple mediators listen for same event<div><p>Assuming that each view is related to one specific data item,
yes? it is fine if each mediator listens/responds to the event.
What is important is that the appropriate mediator responds. You
will need to figure out how to remove the ambiguity as needed via
some sort of ID scheme that the event handler in the mediator will
check to make sure that it is the correct responder.</p>
<p>Does that makes sense?</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/151897312012-04-11T18:24:32Z2012-04-11T18:24:32ZMultiple mediators listen for same event<div><p>Yea I can check in mediator if event is correct for that view,
but isn't it strange that hundrets of mediators recive events that
they don't need?</p></div>Amnesiactag:robotlegs.tenderapp.com,2009-10-18:Comment/151897312012-04-12T16:09:31Z2012-04-12T16:09:31ZMultiple mediators listen for same event<div><p>if that is a concern then you could alternatively mediate the
view that contains your hundreds of instances - event is then
handled in one place, and your container view would then be
responsible for directing the change in the model to the
appropriate instance - again, via some kind of id mechanism</p></div>matt