Mediators not being created for subviews when createMediator() is called on parent view being added as a popup
Defined in bootloader:
mediatorMap.mapView(ParentView , ParentMediator);
mediatorMap.mapView(ChildView , ChildMediator);
ParentView is being added as a popup:
var parentView:ParentView = new ParentView();
PopUpManager.addPopUp(parentView, contextView);
The view loads correctly and the the mediator for the parent
view works as expected. parentView contains the child
view (ChildView) which is mapped to
ChildMediator.
The problem I am having is ChildMediator isn't
being created like I thought it would. Do I need to create it
manually just as the parent?
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 Shaun Smith on 27 Feb, 2013 09:57 PM
RL1 only watches the supplied "contextView" for new views. The problem here is that Flex puts popups on a separate branch of the display list - which RL is not watching.
One solution is outlined here:
http://tangentlin.wordpress.com/2013/02/02/robotlegs-mediator-and-p...
Another solution is to use RL2 which allows you to add more than one container to the ViewManager.
2 Posted by phillip.green.i... on 28 Feb, 2013 06:14 PM
Unfortunately, RL2 isn't an option for us right now. However, I did try the suggestion from the blog post and so far it has worked perfectly.
Support Staff 3 Posted by Shaun Smith on 28 Feb, 2013 11:49 PM
Good stuff. I'm closing this thread for now. Please feel free to re-open, or open another, at any time.
Shaun Smith closed this discussion on 28 Feb, 2013 11:49 PM.
phillip.green.ii re-opened this discussion on 02 Apr, 2013 05:47 PM
4 Posted by phillip.green.i... on 02 Apr, 2013 05:47 PM
Just a follow up; this was my initial working code:
However, we ran into problems when we used automation-runtimeloading. Apparently the loading changes the systemManager, but the following change worked:
Using the top level system manager makes everything work either loaded normally or when loaded through the automation runtime.phillip.green.ii closed this discussion on 02 Apr, 2013 05:47 PM.