Jay Roy
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
and this is my summaryView.mxml which is my inner mxml
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
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>
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>
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
I cannot see your are using summaryView.mxml in your main.mxml
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx very much that worked.
ASKER
can you please help me with my next question.
https://www.experts-exchange.com/questions/26904767/capture-selected-value-from-mouseover.html
thx.
https://www.experts-exchange.com/questions/26904767/capture-selected-value-from-mouseover.html
thx.
Yes, I will look