tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/4924-eventdispatcher-prevent-rl-component-from-receiving-event-that-it-dispatchesRobotlegs: Discussion 2013-12-10T13:56:35Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/304671552013-12-10T13:25:46Z2013-12-10T13:25:46ZEventDispatcher - prevent RL-component from receiving Event that it dispatches.<div><p>Hi Andreas,</p>
<blockquote>
<p>Do I set my UI in some "edit" state and ignore the update-event
when it gets received?</p>
</blockquote>
<p>Yes, why not. You can use states or booleans or something
else.</p>
<p>You can set a boolean, say, "iDontCare" to true when the view is
dispatching the event in question, and in the method that the
mediator is accessing when the model dispatches the change event,
you set iDontCare to false and then just return.</p>
<p>Or, you could do the same on a mediator level, before it
re-dispatches view's event, and then let the mediator decide
whether it should react to the model's event or not, i.e. whether
it should pass the data on to its view or not.</p>
<blockquote>
<p>Do I add some target to my event (the ui/mediator-object) and
ignore the event when this target is the current UI-Element?</p>
</blockquote>
<p>Yes, you can pass along a view ID as the payload of the event
dispatched by the view, but I think the first option is easier to
implement.</p>
<p>Maybe there are other options as well, but I can't think of any
right now.</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/304671552013-12-10T13:42:35Z2013-12-10T13:42:35ZEventDispatcher - prevent RL-component from receiving Event that it dispatches.<div><p>Hi Ondina,</p>
<p>Thank you very much for your quick and helpful response!<br>
I will use an edit-state for my UI than.</p>
<p>Have a Great day.</p>
<p>Andreas</p></div>andreastag:robotlegs.tenderapp.com,2009-10-18:Comment/304671552013-12-10T13:56:35Z2013-12-10T13:56:35ZEventDispatcher - prevent RL-component from receiving Event that it dispatches.<div><p>My pleasure!<br>
Thanks for the wishes, same to you:)</p></div>Ondina D.F.