Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
[ApplicationMediator.as]override public function handleNotification(notification : INotification) : void { switch(notification.getName()) { case ApplicationFacade.VIEW_CAR_DETAILS: // Get the object of interest from the notification var car:Car = notification.getBody() as Car; // Create the view component var carDetailsLayer : CarDetailsLayer = new CarDetailsLayer(); // Register a new mediator for the component facade.registerMediator(new CarDetailsLayerMediator(carDetailsLayer)); // Add the component to the display list mainHost.setLayerContent(carDetailsLayer); break; }}
private var car:Car;public function CarDetailsMediator(viewComponent:CarDetails, car:Car){ this.car = car; super(NAME,viewComponent)}