mapping the mediator for dynamically created views

erdinc's Avatar


02 Apr, 2011 08:40 AM

I have a question like this.
I have a only one context object in my application. With the "mediatorMap.mapView" call I can map the views in my main application to the related mediators (the views that I put in the mxml). However I want to create a "TitleWindow" which is created if I click some button in my previously mapped views. But the problem is I can not map this "TitleWindow" to the related mediator. How can I achieve this?

thanks in advance.

  1. Support Staff 1 Posted by Stray on 02 Apr, 2011 09:02 AM

    Stray's Avatar

    Hi Erdinc,

    did you try it?

    The whole point of the mediatorMap is that the views don't have to exist at the time when you map them. As long as they are added to the contextView at runtime, their mediators will be created.

    However - it sounds like you might be creating a separate window - ie, not in the contextView? (Sorry, your question was a little unclear - you said you can't map it, but I'm thinking you can map it, but the mediator isn't being created?). If so, there are a bunch of articles on here discussing the same. The solution is to manually mediate the view when it is created - but you'll get much more detail from reading those previous posts.

    This article on mediating a flex-popup is also likely to help:

    But have a search around under window / popup because I know this question has been answered many times before. (We're working on improving the website to make these answers easier to find!)



  2. 2 Posted by Ahmet Erdinc YI... on 02 Apr, 2011 10:51 AM

    Ahmet Erdinc YILMAZ's Avatar

    Firstly, I am very impressed by your interest. "robotlegs" is very
    useful for me, also your support desk is excellent.
    I have tried and solved my problem. As you said, I map my view to the
    mediator but since the window is not created
    in the "contextView", I had to create the mediator manually when I
    create the view. (thanks to the knowledge based articles). Again thanks
    for your response. I will also read the all related articles.I really
    appreciate your work.


  3. Support Staff 3 Posted by Stray on 02 Apr, 2011 11:07 AM

    Stray's Avatar

    No problem erdinc! I'm glad you got it sorted.

    "Support desk" made me smile - I answered your question while making breakfast!

    We aim to be around to help promptly, but there is also a growing collection of robotlegs users who can also help each other out.

    I'll close this now - feel free to come back if you have more questions,



  4. Stray closed this discussion on 02 Apr, 2011 11:07 AM.

  5. Ahmet Erdinc YILMAZ re-opened this discussion on 02 Apr, 2011 11:11 AM

  6. 4 Posted by Ahmet Erdinc YI... on 02 Apr, 2011 11:11 AM

    Ahmet Erdinc YILMAZ's Avatar

    No content.

  7. Stray closed this discussion on 29 Apr, 2011 04:57 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