Mediated view inside of item ItemRenderer
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.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Ondina D.F. on 23 Nov, 2016 01:14 PM
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:
http://knowledge.robotlegs.org/discussions/solutions/11-solution-fo...
About item renderers:
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt2.html
And once again: please DO NOT involve robotlegs in the inner life of itemRenderers or vice versa :)
2 Posted by kamcknig on 24 Nov, 2016 02:34 PM
Great, thanks for the info!
Support Staff 3 Posted by Ondina D.F. on 28 Nov, 2016 02:18 PM
No problem!
Ondina D.F. closed this discussion on 28 Nov, 2016 02:18 PM.