tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/9-proper-way-to-inject-unique-data-from-a-group-of-dynamically-generated-meditatorsRobotlegs: Discussion 2018-10-18T16:35:06Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/5819132009-11-13T05:52:33Z2009-11-13T05:52:37ZProper way to inject unique data from a group of dynamically generated meditators.<div><p>Let's say that I have a single "parent" view. And based off of
xml data the parent mediator will add numerous "child" views to its
parent view display list. Whats the proper Robotlegs way of
injecting unique data into the children views? I've only come up
with these:</p>
<ol>
<li>
<p>Give each child view an unique id from the parent mediator at
its creation. Then in the autoCreated child mediator, filter data
based off the child view id. Only question then is how to correctly
link the id to the view based off of xml data.</p>
</li>
<li>
<p>Pass VO objects to the child views from the parent mediator at
creation and have only the parent mediate for them. This cant be
right.</p>
</li>
<li>
<p>Would the mediator map's injectViewAs have anything to do with
this, cant find any info on that feature.</p>
</li>
</ol>
<p>Obviously I'm not sure what to do. Any suggestions? Thanks.</p>
<p>Lovely support site by the way.</p></div>Michaeltag:robotlegs.tenderapp.com,2009-10-18:Comment/5819132009-11-13T06:03:23Z2009-11-13T06:05:33ZProper way to inject unique data from a group of dynamically generated meditators.<div><p>Hi Michael,</p>
<p><a href=
"http://github.com/robotlegs/robotlegs-demos-Bundle/blob/master/WheresWindow/src/org/robotlegs/demos/whereswindow/model/OpenWindowsProxy.as">
http://github.com/robotlegs/robotlegs-demos-Bundle/blob/master/Wher...</a></p>
<p>You can see in this Model(Proxy) I am keeping a map of
mediators. That was the purpose of this project, was to provide a
mechanism for accessing a set of like mediators with a UID. The key
is really to turn off the automatic mediation and control the
creation of mediators via a command, this gives you the opportunity
to manually inject whatever identifier you need to (such as the
vo). So perhaps the command could create the views, inject the VO,
mediate, and then send an event with the views in an array to be
added to the parent via its mediator.</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/5819132009-11-13T06:15:00Z2009-11-13T06:15:02ZProper way to inject unique data from a group of dynamically generated meditators.<div><p>Joel,</p>
<p>Thank you! I didn't notice at first the other demos in the demos
bundle besides the 6 in the live examples. This is perfect. Thanks
again.</p></div>Michael