tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/17763-mediated-view-inside-of-item-itemrendererRobotlegs: Discussion 2016-11-28T14:18:06Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/412823692016-11-22T16:17:47Z2016-11-22T16:17:47ZMediated view inside of item ItemRenderer<div><p>I have an ItemRenderer that contains a view that is being
mediated.</p>
<p>My mediator has a trace statement in the initialize, but
sometimes it seems like the mediator isn't added because the trace
isn't called when those item renderers are added. I have tried
setting useVirtualLayout to false to see if it was funky behavior
with reuse of the renderers and still does the same thing.</p></div>kamcknigtag:robotlegs.tenderapp.com,2009-10-18:Comment/412823692016-11-23T13:14:57Z2016-11-23T13:14:57ZMediated view inside of item ItemRenderer<div><p>Please, <strong>do not mediate</strong> item renderers!!</p>
<p>Mediation of item renderers = = TROUBLE</p>
<p>Item renderers shouldn't be dependent on any framework.</p>
<p>Let the parent View (containing the owner of the renderer) or
the owner (a List, or a DataGrid, or a DropDown, etc) be the ones
communicating with the framework, via their mediator.</p>
<p>It is impossible for me to say why exactly the framework is not
hearing the added to stage event dispatched by the renderer, but it
sounds like it is caused by things like recycling, re-parenting,
resizing, transitions, states, effects, scrolling, or how and when
you create the renderer's owner and the renderer itself....</p>
<p>If you don't want to follow my advice to <strong>not
mediate</strong> ItemRenderers, then you can try out this:</p>
<p><a href="http://knowledge.robotlegs.org/discussions/solutions/11-solution-for-starting-a-mediator-with-the-view-being-an-itemrenderer-from-a-list-from-a-popup">
http://knowledge.robotlegs.org/discussions/solutions/11-solution-fo...</a></p>
<p>About item renderers:</p>
<p><a href="http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html">http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html</a><br>
<a href="http://www.adobe.com/devnet/flex/articles/itemrenderers_pt2.html">http://www.adobe.com/devnet/flex/articles/itemrenderers_pt2.html</a></p>
<p>And once again: please DO NOT involve robotlegs in the inner
life of itemRenderers or vice versa :)</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/412823692016-11-24T14:34:05Z2016-11-24T14:34:05ZMediated view inside of item ItemRenderer<div><p>Great, thanks for the info!</p></div>kamcknigtag:robotlegs.tenderapp.com,2009-10-18:Comment/412823692016-11-28T14:18:03Z2016-11-28T14:18:03ZMediated view inside of item ItemRenderer<div><p>No problem!</p></div>Ondina D.F.