tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/710-rl-2-alternative-to-viewmapmappackage-compackageRobotlegs: Discussion 2018-10-18T16:35:45Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/236306582013-01-09T10:21:12Z2013-01-09T10:21:12ZRL 2 alternative to viewmap.mapPackage( "com.package" ) ?<div><p>Hi guys,</p>
<p>as the topic says:<br>
does anyone know what the alternative approach is to
viewmap.mapPackage( "com.package" ) ?<br>
I like to work with an MVP-like approach;I want to be able to
inject signals and PM's in my view components.<br>
In RL 1 this was very straight forward.<br>
Is this still possible in RL 2? (I looked at the examples and
documentation but didn't find it...)</p>
<p>Thanx!<br>
Hans</p></div>dotdotcommadottag:robotlegs.tenderapp.com,2009-10-18:Comment/236306582013-01-09T12:46:30Z2013-01-09T12:52:44ZRL 2 alternative to viewmap.mapPackage( "com.package" ) ?<div><p>You need to use the ViewProcessorMap extension: <a href=
"https://github.com/robotlegs/robotlegs-framework/tree/master/src/robotlegs/bender/extensions/viewProcessorMap">
https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...</a></p>
<p>Haven't used it yet, but seems like the RL1 like usage would be
<code>viewProcessorMap.map(SomeType).forInjection();</code></p>
<p>and for matching packages:</p>
<p><code>viewProcessorMap.map( new PackageMatcher().anyOf(
'com.package' ) ).forInjection();</code></p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/236306582013-01-09T13:09:05Z2013-01-09T13:09:05ZRL 2 alternative to viewmap.mapPackage( "com.package" ) ?<div><p>hah! works like a charm :)<br>
I tried this before, but apparently I was just running in the
popup-issue again.</p>
<p>Good tip (although off-topic): if pop-ups aren't getting
dependency-injection, or linked mediators aren't triggering,<br>
set <code>contextTag.contextView =
FlexGlobals.topLevelApplication.systemManager;</code> in your
Main.mxml.</p>
<p>Thanx creynders!</p></div>dotdotcommadot