Skip to content

Instantly share code, notes, and snippets.

@nsdevaraj
Created May 31, 2010 13:31
Show Gist options
  • Save nsdevaraj/419837 to your computer and use it in GitHub Desktop.
Save nsdevaraj/419837 to your computer and use it in GitHub Desktop.
YourView.mxml
... xmlns:mx="library://ns.adobe.com/flex/mx" addedToStage="viewContext.dispatch(this)">
<mx:Script>
<![CDATA[
import com.adams.scrum.signals.ViewSignal;
[Inject]
public var viewContext:ViewSignal;
]]>
</mx:Script>
AbstractViewMediator.as
protected var viewType:Class;
public function AbstractViewMediator(viewType:Class)
{
super();
this.viewType = viewType;
}
[MediateSignal(type="ViewSignal")]
public function setView(value:UIComponent):void
{
if(value is viewType && )
{
this._view = value as UIComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment