Link to home
Start Free TrialLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

Pass value from outer mxml to inner mxml

hi guys i have main.xml and summaryView.mxml. Iam trying to pass value from the main.xml into summaryView.mxml

main.mxml
<mx:VBox>
<mx:Script >
<![CDATA[
 import org.entity.project.ProjectSummaryDTO;	
[Bindable]
public var currentProject:ProjectSummaryDTO;

</mx:Script>
<mx:Form width="1094" height="2200">	
<mx:ViewStack id="workflowViewStack" width="100%" height="100%" borderColor="#000000" cornerRadius="4" >
<projectWork:summaryView label="Project Info"/>      --  The inner mxml,not able to pass id here
<projectWork:detailView label="{currentProject.id}"/>  -- This works fine, i am able to see the id.			 
</mx:ViewStack>			
</mx:Form>	
</mx:VBox>

Open in new window


and this is my summaryView.mxml which is my inner mxml

<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" 
 xmlns:projectNav="org.view.projectNav.*" creationComplete="init()"
width="100%" height="100%">
	 
<mx:Script>
<![CDATA[
import org.entity.project.ProjectSummaryDTO;	
import mx.controls.Alert;			 
[Bindable]
public var currentProject:ProjectSummaryDTO;
public function init():void {		
Alert.show(currentProject.id, "passing workflow id"); -- This does not work, i dont see the id here 			
}
]]>
</mx:Script>

Open in new window


I am trying to pass the value of currentProject.id   from a outer mxml (main.mxml)  to a inner mxml (summaryView.mxml) .
any idea how i can get the value of currentProject.id  in my summaryView.mxml?

any help appreciated
thanks
Avatar of dgofman
dgofman
Flag of United States of America image

I cannot see your are using summaryView.mxml in your main.mxml
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Roy

ASKER

thx very much that worked.
Yes, I will look