Like this?
I produce an XLS sheet via the DB very much like this with several different
levels. But this is dove with Cold Fusion. Then I send it back through the
RemoteObject like I earlier displayed and then I can use it how ever I want.
http://www.franticphotos.com/0personal0/flex/bin/main.html
Wait till the LOADING bar finishes and you will see a tree list display. This
is all dove with a multilevel node XML.
If you need to see the code I can give you all access to this as well. I'm
not sure I'm even helping right now :-)
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen
Sent: Thursday, April 26, 2007 3:00 PM
To: [email protected]
Subject: Re: [AFFUG Discuss] Using XML as a dataProvider
ha, timing!
filterData.lastResult...item
Curious, what if your XML has item nodes at different levels?
DK
On 4/26/07, Clarke Bishop <[EMAIL PROTECTED]> wrote:
Thanks Robert!
Precia taught me a new trick that solved my problem:
This does not work:
<mx:XMLListCollection id="xc " source="{filterData.lastResult.filter.item
}"/>
But, this does:
<mx:XMLListCollection id="xc" source=" {filterData.lastResult...item }"/>
This would seem to access the same data. But apparently, AS3 does not like
for you to reference the root node. So, the second syntax works, but the
first one doesn't!
I thought you all might like to know in case you run into this.
Clarke
________________________________
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ]
On
Behalf Of Robert Capilli
Sent: Thursday, April 26, 2007 1:39 PM
To: [email protected]
Subject: RE: [AFFUG Discuss] Using XML as a dataProvider
This is what I do.
<!-- Gets the site tree to be displayed -->
<mx:RemoteObject id="e4xService" endpoint="
http://apps.eyewonderlabs.com/flex2gateway/" destination="ColdFusion"
source="robert.SiteSpecSystem.CFC.RecursiveSearchForTree"
result="SaveXMLData(event)"/>
<mx:XMLListCollection id="myXMLList" source="{myXML.node}"/>
Then in my Data Tree I do this..
<mx:Tree id="myTree"
folderClosedIcon="@Embed(source='images/icon_parent.png')"
folderOpenIcon="@Embed(source='images/icon_parent.png')"
defaultLeafIcon="@Embed(source='images/icon_child.png')"
x="10" y="26" width="100%" dataProvider="{myXMLList}" labelField="@label"
change="selectNode(event,'Tree')" height="443"/>
Notice the labelField. @label
My XML has a attribute called Label.
<Employee Label="john smith">
This displays the Label within my tree
If you need I can send you the file that I do this in and you can see how
it's done. I build my XML file dynamically via the DB. Then I use the XML
file as shown above.
________________________________
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ]
On
Behalf Of Clarke Bishop
Sent: Thursday, April 26, 2007 1:20 PM
To: [email protected]
Subject: [AFFUG Discuss] Using XML as a dataProvider
I am trying to use XML (e4x format) as a dataProvider.
1. I load the XML via an HTTPService call that is triggered by the
CreationComplete event that calls my init() method.
<mx:HTTPService id=" filterData" url="ModelData/FilterData.xml"
result="xmlResult()" resultFormat="e4x" />
2. The XML data comes back. I can see it with the debugger in lastResult.
3. I'm trying to assign the filterData XML to an XMLListCollection like this:
<mx:XMLListCollection id="xc " source="{filterData.lastResult.filter.item
}"/>
I know the dataGrid is supposed to automatically convert an XMLList to an
XMLListCollection, but since it's not working, I thought I could understand
it better by doing it manually.
The problem is that even though the XML data is there, the XMLListCollection
stays blank. What am I missing?
By the way, here's an example of my external XML file:
<?xml version= "1.0" encoding= "UTF-8"?>
< filter>
<item section= "Mission">
< question> Do you like this color?</question >
<response >Y </response>
</ item>
</ filter>
Thanks for any ideas!
Clarke
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------
<Root>
<node label="Yahoo" >
<node label="Yahoo Sports" isBranch="true"/>
<node label="Yahoo Entertainment">
<node label="Yahoo.com" />
<node label="YahooSpace.com" />
<node label="Yahoo Softball">
<node label="The Insider" />
<node label="YahooET.com" />
</node>
</node>
</node>
<node label="AOL">
<node label="AOl Technologies" isBranch="true"/>
<node label="Aol Sports">
<node label="Football" />
<node label="Basketball" />
<node label="Soccer" />
<node label="Curling" />
</node>
</node>
<node label="ABC News" >
<node label="ABC Sports" isBranch="true"/>
<node label="ABC Entertainment">
<node label="ABC.com" />
<node label="Familyguy.com" />
<node label="ABC Sports">
<node label="ATHF" />
<node label="dog.com" />
</node>
</node>
</node>
<node label="ESPN">
<node label="ESPN Programs" isBranch="true"/>
<node label="ESPN Sports">
<node label="ESPNFootball" />
<node label="ESPNBasketball" />
<node label="ESPNSoccer" />
<node label="ESPNCurling" />
</node>
</node>
<node label="UPS" >
<node label="Shipping" isBranch="true"/>
<node label="UPS Solutions">
<node label="UPS.com" />
<node label="Package.com" />
<node label="UPS Package">
<node label="mailboxetc.com" />
<node label="shippingpackages.com" />
</node>
</node>
</node>
<node label="UPN">
<node label="upn.com" isBranch="true"/>
<node label="UPN Upcomming">
<node label="monday" />
<node label="Tuesday" />
<node label="Wednesday" />
<node label="Thursday" />
</node>
</node>
<node label="Nick" >
<node label="TvShows" isBranch="true"/>
<node label="Tv Show Types">
<node label="Sponge Bob" />
<node label="Dora the Explorer" />
<node label="Speaking Spanish">
<node label="NickSpanish.com" />
<node label="SpanishGames.com" />
</node>
</node>
</node>
<node label="Kelloggs">
<node label="Ads" isBranch="true"/>
<node label="Cereal">
<node label="SpecialK" />
<node label="Wheat Thins" />
<node label="Triscuits" />
<node label="Cookies" />
</node>
</node>
<node label="Air Force" >
<node label="Fly" isBranch="true"/>
<node label="Recruit">
<node label="AF.com" />
<node label="Signup.com" />
<node label="WebSite">
<node label="GoAirforce.com" />
<node label="SeeWhatsInside.com" />
</node>
</node>
</node>
<node label="Army">
<node label="Join" isBranch="true"/>
<node label="Go Army">
<node label="goArmy.com" />
<node label="Shootbadguys.com" />
<node label="Recruit_Tim.com" />
<node label="Recruit_Rusty.com" />
</node>
</node>
<node label="CBS News" >
<node label="CBS Sports" isBranch="true"/>
<node label="CBS Entertainment">
<node label="CBS.com" />
<node label="StarTrek.com" />
<node label="CBS Sports">
<node label="The Insider" />
<node label="ET.com" />
</node>
</node>
</node>
<node label="AOL">
<node label="AOl Technologies" isBranch="true"/>
<node label="Aol Sports">
<node label="Football" />
<node label="Basketball" />
<node label="Soccer" />
<node label="Curling" />
</node>
</node>
<node label="CBS News" >
<node label="CBS Sports" isBranch="true"/>
<node label="CBS Entertainment">
<node label="CBS.com" />
<node label="StarTrek.com" />
<node label="CBS Sports">
<node label="The Insider" />
<node label="ET.com" />
</node>
</node>
</node>
<node label="AOL">
<node label="AOl Technologies" isBranch="true"/>
<node label="Aol Sports">
<node label="Football" />
<node label="Basketball" />
<node label="Soccer" />
<node label="Curling" />
</node>
</node>
<node label="UPS" >
<node label="Shipping" isBranch="true"/>
<node label="UPS Solutions">
<node label="UPS.com" />
<node label="Package.com" />
<node label="UPS Package">
<node label="mailboxetc.com" />
<node label="shippingpackages.com" />
</node>
</node>
</node>
<node label="UPN">
<node label="upn.com" isBranch="true"/>
<node label="UPN Upcomming">
<node label="monday" />
<node label="Tuesday" />
<node label="Wednesday" />
<node label="Thursday" />
</node>
</node>
<node label="Nick" >
<node label="TvShows" isBranch="true"/>
<node label="Tv Show Types">
<node label="Sponge Bob" />
<node label="Dora the Explorer" />
<node label="Speaking Spanish">
<node label="NickSpanish.com" />
<node label="SpanishGames.com" />
</node>
</node>
</node>
<node label="Kelloggs">
<node label="Ads" isBranch="true"/>
<node label="Cereal">
<node label="SpecialK" />
<node label="Wheat Thins" />
<node label="Triscuits" />
<node label="Cookies" />
</node>
</node>
<node label="Air Force" >
<node label="Fly" isBranch="true"/>
<node label="Recruit">
<node label="AF.com" />
<node label="Signup.com" />
<node label="WebSite">
<node label="GoAirforce.com" />
<node label="SeeWhatsInside.com" />
</node>
</node>
</node>
<node label="Army">
<node label="Join" isBranch="true"/>
<node label="Go Army">
<node label="goArmy.com" />
<node label="Shootbadguys.com" />
<node label="Recruit_Tim.com" />
<node label="Recruit_Rusty.com" />
</node>
</node>
<node label="CBS News" >
<node label="CBS Sports" isBranch="true"/>
<node label="CBS Entertainment">
<node label="CBS.com" />
<node label="StarTrek.com" />
<node label="CBS Sports">
<node label="The Insider" />
<node label="ET.com" />
</node>
</node>
</node>
<node label="AOL">
<node label="AOl Technologies" isBranch="true"/>
<node label="Aol Sports">
<node label="Football" />
<node label="Basketball" />
<node label="Soccer" />
<node label="Curling" />
</node>
</node>
<node label="CBS News" >
<node label="CBS Sports" isBranch="true"/>
<node label="CBS Entertainment">
<node label="CBS.com" />
<node label="StarTrek.com" />
<node label="CBS Sports">
<node label="The Insider" />
<node label="ET.com" />
</node>
</node>
</node>
<node label="AOL">
<node label="AOl Technologies" isBranch="true"/>
<node label="Aol Sports">
<node label="Football" />
<node label="Basketball" />
<node label="Soccer" />
<node label="Curling" />
</node>
</node>
<node label="UPS" >
<node label="Shipping" isBranch="true"/>
<node label="UPS Solutions">
<node label="UPS.com" />
<node label="Package.com" />
<node label="UPS Package">
<node label="mailboxetc.com" />
<node label="shippingpackages.com" />
</node>
</node>
</node>
<node label="UPN">
<node label="upn.com" isBranch="true"/>
<node label="UPN Upcomming">
<node label="monday" />
<node label="Tuesday" />
<node label="Wednesday" />
<node label="Thursday" />
</node>
</node>
<node label="Nick" >
<node label="TvShows" isBranch="true"/>
<node label="Tv Show Types">
<node label="Sponge Bob" />
<node label="Dora the Explorer" />
<node label="Speaking Spanish">
<node label="NickSpanish.com" />
<node label="SpanishGames.com" />
</node>
</node>
</node>
<node label="Kelloggs">
<node label="Ads" isBranch="true"/>
<node label="Cereal">
<node label="SpecialK" />
<node label="Wheat Thins" />
<node label="Triscuits" />
<node label="Cookies" />
</node>
</node>
<node label="Air Force" >
<node label="Fly" isBranch="true"/>
<node label="Recruit">
<node label="AF.com" />
<node label="Signup.com" />
<node label="WebSite">
<node label="GoAirforce.com" />
<node label="SeeWhatsInside.com" />
</node>
</node>
</node>
<node label="Army">
<node label="Join" isBranch="true"/>
<node label="Go Army">
<node label="goArmy.com" />
<node label="Shootbadguys.com" />
<node label="Recruit_Tim.com" />
<node label="Recruit_Rusty.com" />
</node>
</node>
</Root>