I am facing this problem of data transfer from one datastructure to another i tried making a component which picks up some values dynamically from an xml file
which xml needs to be picked is also to be dynamic based users choice.
So the main file looks like this.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="pname.send()" xmlns:ns1="component.*">
<mx:states>
<mx:State name="Projectlinks" >
<mx:AddChild position="lastChild" >
<ns1:project x="667" y="23" height="415" >
</ns1:project>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:HTTPService id="pname" url="" useProxy="false" />
<mx:HTTPService id="plink" url="" useProxy="false" />
<mx:Panel x="460" y="23" width="179" height="242" layout="absolute" >
<mx:Label x="24" y="10" id="lab1" text="{names.selectedItem.path}" visible="false"/>
<mx:DataGrid x="10" y="36" id="names" dataProvider="{pname.result.projects.proj}" width="139" click="plink.send();transfer();currentState='Projectlinks';" >
<mx:columns>
<mx:DataGridColumn headerText="Names Of Projects" dataField="name" />
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:Script>
<![CDATA[
[Bindable]
public var link;
public function transfer(){
link=plink.result;
}
]]>
</mx:Script>
</mx:Application>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The componenet file looks like this
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" height="466" width="316" >
<mx:DataGrid x="10" y="10" height="406" width="276" dataProvider="link.project.link">
<mx:columns>
<mx:DataGridColumn headerText="Imp Links" dataField="name"/>
</mx:columns>
</mx:DataGrid>
<mx:Script>
<![CDATA[
[Bindable]
public var link ;
]]>
</mx:Script>
</mx:Panel>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
the problem i want to solve is when a user clicks on the initial data grid on some choice the i want to fetch the required xml and i need to bind that data to components datagrid
Thanks
Sachin gaur
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.