Created
July 21, 2010 06:34
-
-
Save nsdevaraj/484150 to your computer and use it in GitHub Desktop.
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
<?xml version="1.0" encoding="utf-8"?> | |
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
width="100%" height="100%" xmlns:views="com.adams.scrum.views.*" | |
xmlns:mediators="com.adams.scrum.views.mediators.*" | |
creationComplete="creationCompleteHandler(event)"> | |
<fx:Binding destination="moduleIndex" source="{currentInstance.mainViewStackIndex}"/> | |
<fx:Script> | |
<![CDATA[ | |
import com.adams.scrum.models.vo.CurrentInstance; | |
import mx.binding.utils.BindingUtils; | |
import mx.binding.utils.ChangeWatcher; | |
import mx.events.FlexEvent; | |
import com.adams.scrum.utils.Utils; | |
[Bindable] | |
[Inject] | |
public var currentInstance:CurrentInstance; | |
private var part:stagePanel; | |
protected function creationCompleteHandler(event:FlexEvent):void | |
{ | |
part = new stagePanel(); | |
addElement(part); | |
part.url = Utils.VIEW_INDEX_ARR[0]; | |
} | |
protected function changeModuleIndex():void{ | |
part.url =''; | |
part.url = Utils.VIEW_INDEX_ARR[moduleIndex]; | |
} | |
private var _moduleIndex:int; | |
public function get moduleIndex():int | |
{ | |
return _moduleIndex; | |
} | |
public function set moduleIndex(value:int):void | |
{ | |
_moduleIndex = value; | |
changeModuleIndex() | |
} | |
]]> | |
</fx:Script> | |
<fx:Declarations> | |
<fx:Component id="componentGroup" className="stagePanel"> | |
<s:Group width="100%" height="100%"> | |
<fx:Script> | |
<![CDATA[ | |
import mx.events.FlexEvent; | |
[Bindable] | |
private var _url:String; | |
public function get url():String | |
{ | |
return _url; | |
} | |
public function set url(value:String):void | |
{ | |
_url = value; | |
_url.length>0 ? ml.loadModule(_url) : ml.unloadModule(); | |
} | |
]]> | |
</fx:Script> | |
<s:layout> | |
<s:VerticalLayout horizontalAlign="center" /> | |
</s:layout> | |
<mx:ModuleLoader id="ml" width="100%" height="100%" | |
applicationDomain="{ApplicationDomain.currentDomain}" /> | |
</s:Group> | |
</fx:Component> | |
</fx:Declarations> | |
<s:layout> | |
<s:VerticalLayout horizontalAlign="center"/> | |
</s:layout> | |
</s:Group> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment