Mediated view inside of item ItemRenderer

kamcknig's Avatar


22 Nov, 2016 04:17 PM

I have an ItemRenderer that contains a view that is being mediated.

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.

  1. Support Staff 1 Posted by Ondina D.F. on 23 Nov, 2016 01:14 PM

    Ondina D.F.'s Avatar

    Please, do not mediate item renderers!!

    Mediation of item renderers = = TROUBLE

    Item renderers shouldn't be dependent on any framework.

    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.

    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....

    If you don't want to follow my advice to not mediate ItemRenderers, then you can try out this:

    About item renderers:

    And once again: please DO NOT involve robotlegs in the inner life of itemRenderers or vice versa :)

  2. 2 Posted by kamcknig on 24 Nov, 2016 02:34 PM

    kamcknig's Avatar

    Great, thanks for the info!

  3. Support Staff 3 Posted by Ondina D.F. on 28 Nov, 2016 02:18 PM

    Ondina D.F.'s Avatar

    No problem!

  4. Ondina D.F. closed this discussion on 28 Nov, 2016 02:18 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac