Created
November 3, 2011 13:17
-
-
Save Ondina/1336448 to your computer and use it in GitHub Desktop.
ApplicationMediator (ViewNavigatorApplication)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.robotlegs.demos.robotlegsincremental.views.mediators | |
{ | |
import com.robotlegs.demos.robotlegsincremental.controllers.events.NavigationEvent; | |
import org.robotlegs.mvcs.Mediator; | |
/** | |
* | |
* @author [Ondina D. F.] | |
* | |
*/ | |
public class ApplicationMediator extends Mediator | |
{ | |
[Inject] | |
public var view:ContextView; | |
override public function onRegister():void | |
{ | |
eventMap.mapListener(view, NavigationEvent.ACTIVE_VIEW_CHANGED, onActiveViewChanged); | |
eventMap.mapListener(eventDispatcher, NavigationEvent.ACTIVE_VIEW_CHANGED, changeActiveView); | |
} | |
protected function onActiveViewChanged(event:NavigationEvent):void | |
{ | |
trace("ApplicationMediator.onActiveViewChanged(event)" + event.viewClass); | |
} | |
protected function changeActiveView(event:NavigationEvent):void | |
{ | |
view.changeActiveView(event.viewClass); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment