RL 2 alternative to viewmap.mapPackage( "com.package" ) ?

dotdotcommadot's Avatar


09 Jan, 2013 10:21 AM

Hi guys,

as the topic says:
does anyone know what the alternative approach is to viewmap.mapPackage( "com.package" ) ?
I like to work with an MVP-like approach;I want to be able to inject signals and PM's in my view components.
In RL 1 this was very straight forward.
Is this still possible in RL 2? (I looked at the examples and documentation but didn't find it...)


  1. Support Staff 1 Posted by creynders on 09 Jan, 2013 12:46 PM

    creynders's Avatar

    You need to use the ViewProcessorMap extension: https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...

    Haven't used it yet, but seems like the RL1 like usage would be viewProcessorMap.map(SomeType).forInjection();

    and for matching packages:

    viewProcessorMap.map( new PackageMatcher().anyOf( 'com.package' ) ).forInjection();

  2. 2 Posted by dotdotcommadot on 09 Jan, 2013 01:09 PM

    dotdotcommadot's Avatar

    hah! works like a charm :)
    I tried this before, but apparently I was just running in the popup-issue again.

    Good tip (although off-topic): if pop-ups aren't getting dependency-injection, or linked mediators aren't triggering,
    set contextTag.contextView = FlexGlobals.topLevelApplication.systemManager; in your Main.mxml.

    Thanx creynders!

  3. dotdotcommadot closed this discussion on 09 Jan, 2013 03:38 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