tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/623-modal-queuemanager-in-rlRobotlegs: Discussion 2018-10-18T16:35:30Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/90095652011-08-02T09:25:51Z2011-08-02T09:25:51ZModal queue/manager in RL<div><p>Hi Ryan,</p>
<blockquote>Right now, the problem is (or I think its a problem)
that I need to populate the modal with data from models so I have
to set a public id value on the View that its Mediator grabs in
order to fetch the data from the model. This seem like bad practice
in RL.</blockquote>
<p>My first thought was, why would it be a bad practice to have
getters/setters inside the view? In my opinion it’s not bad
practice. Opinions may differ :)</p>
<p>Like this:<br>
View</p>
<pre>
<code>
protected var _viewId:String;
public function get viewId():String
{
return _viewId;
}
public function set viewId(value:String):void
{
_viewId=value;
}
</code>
</pre>
<p>Mediator</p>
<p>doSomethingWithThe(view.viewId);</p>
<p>That’s in case you were talking about the views’ ID,
that a mediator would need. Maybe you were using getters already,
so if I missed your point, more details about your app would be
helpful.<br>
Or were you talking about the communication between Mediators and
Models, and the best way to fetch data from a model?</p>
<p>I just wanted to get the discussion started, and I hope someone
else will take over from here :)</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/90095652011-08-02T16:22:29Z2011-08-02T16:22:30ZModal queue/manager in RL<div><p>Yeah, that's pretty much how I'm doing it. I pass an id to the
view constructor that the mediator fetches once its added to the
stage. Then the mediator uses that to retrieve the data it needs
from the model(s).<br>
I don't know why I thought this was bad. It just feels sloppy for
some reason.</p></div>ryan.hunt