ViewManager -> what is it for?

Vj3k0's Avatar


26 Nov, 2012 01:55 PM

Hi, I've been wondering what is ViewManager use and how is it actually properly used... I cannot seem to find any tutorial, and there is no readme for that extension...


  1. Support Staff 1 Posted by Shaun Smith on 26 Nov, 2012 07:41 PM

    Shaun Smith's Avatar

    Hi Vjeko,

    Good point! I need to add a readme for that one, but it's pretty involved..

    The ViewManager is the bridge between a context and the central view container registry. The container registry keeps track of all registered containers (usually Context Views) and sorts them hierarchically. When view objects land on stage they are passed through to the appropriate contexts to handle based on this hierarchy.

    In the MVCSBundle a configuration is installed that looks like this:

    As you can see it simply registers the Context View as a container with the View Manager. Extensions like the Mediator Map register themselves as view handlers with the View Map:

    The only time you'd actually use the View Manager directly is when dealing with Flex PopUps or Air Windows. Using the View Manager you can register these containers (which live on a separate Display List) as "view roots" so that your extensions can observe views landing in them.

    Also, worth noting is that the MVCSBundle installs the StageObserver extension which is the final piece in the puzzle:

    All of this is an approach to dealing with modular, hierarchical contexts whilst trying to keep the overhead of the bubbling addedToStage listener to a minimum. Without this, the listeners might overlap, severely degrading performance.

  2. 2 Posted by Vj3k0 on 27 Nov, 2012 07:49 AM

    Vj3k0's Avatar

    Hej Shaun, thanks for the answer! Much clearer now.

  3. Ondina D.F. closed this discussion on 29 Nov, 2012 10:11 AM.

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