Pass value from outer mxml to inner mxml

Posted on 2011-03-22
Last Modified: 2012-05-11
hi guys i have main.xml and summaryView.mxml. Iam trying to pass value from the main.xml into summaryView.mxml

<mx:Script >
 import org.entity.project.ProjectSummaryDTO;	
public var currentProject:ProjectSummaryDTO;

<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="{}"/>  -- This works fine, i am able to see the id.			 

Open in new window

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

<mx:VBox xmlns:mx="" 
 xmlns:projectNav="org.view.projectNav.*" creationComplete="init()"
width="100%" height="100%">
import org.entity.project.ProjectSummaryDTO;	
import mx.controls.Alert;			 
public var currentProject:ProjectSummaryDTO;
public function init():void {, "passing workflow id"); -- This does not work, i dont see the id here 			

Open in new window

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

any help appreciated
Question by:royjayd
  • 3
  • 2
LVL 29

Expert Comment

ID: 35192345
I cannot see your are using summaryView.mxml in your main.mxml
LVL 29

Accepted Solution

dgofman earned 500 total points
ID: 35192675, "passing workflow id"); -- This does not work, i dont see the id here                   
-- You cannot see id because you currentProject is NULL

<projectWork:summaryView label="Project Info"/>      --  The inner mxml,not able to pass id here

-- You are not passing "currentProject", how inner class should get your instance?

Here is the solution:

<projectWork:summaryView label="Project Info" currentProject="{currentProject}"/>  

Author Comment

ID: 35194374
thx very much that worked.

Author Comment

ID: 35194399
LVL 29

Expert Comment

ID: 35194419
Yes, I will look

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FLEX 3 LineChart doubt 4 272
Converting PDF to SWF with video embedded 11 453
Keep a player within a circular area 3 258
Adobe license 6 266
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now