tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/154-accessing-a-mediator-in-a-commandRobotlegs: Discussion 2018-10-18T16:35:12Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/16349112010-05-08T23:25:06Z2010-05-08T23:25:34Zaccessing a mediator in a command<div><p>They are intentionally difficult to get at in a command. What
you want to do is kick an event/signal with the ChatSession from
the command that is received by the mediator and the view updated
accordingly.</p>
<p>From the look of it:</p>
<p>contactItem.rosterItem.jid.toBareJIDString()</p>
<p>what you REALLY want here is the jid. I'd consider triggering
the command with the payload you need and avoid digging that deep
into an object <code></unsolicitatedAdvice></code></p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/16349112010-05-08T23:32:09Z2010-05-08T23:32:12Zaccessing a mediator in a command<div><p>joel, thank you for your quick reply. i'm going to get some
sleep now and try to simplify things tomorrow according to your
advice.<br>
<code></communitySupportRocks></code></p></div>tomtag:robotlegs.tenderapp.com,2009-10-18:Comment/16349112010-05-09T10:44:05Z2010-05-09T10:44:05Zaccessing a mediator in a command<div><p>Agree with Joel.</p>
<p>And - as a rule - if it's hard to do in RobotLegs then I've
probably got a problem with my design.</p></div>Straytag:robotlegs.tenderapp.com,2009-10-18:Comment/16349112010-05-13T18:57:00Z2010-05-13T18:57:04Zaccessing a mediator in a command<div><p>i've been following joel's advise - it is working fine. this
question can be closed in happiness.</p></div>tomtag:robotlegs.tenderapp.com,2009-10-18:Comment/16349112010-06-04T15:42:04Z2010-06-30T11:35:01Zaccessing a mediator in a command<div><p>Hey guys! Have got the same question and found the answer
here.<br>
That's ok but the best practices state that Commands may "Be
injected with Models, Services, and Mediators to perform work on
directly". Should be changed.</p></div>nikdudnik