Hi all,
I'm at a loss here. I've got a tree set up to retrieve XML data.
It works fine until the data in the XML changes. Then the tree
won't reflect the new data until my flex application is recompiled.
I believe when the application is being recomplied it's grabbing the
XML and setting it somehow. Here is some code.
****************CODE***************
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
import mx.controls.Alert;
import mx.collections.*;
[Bindable]
public var myXLC:XMLListCollection;
public function afterComp():void
{
myXLC = new XMLListCollection(TreeXML.children());
tvwProjects.invalidateList();
}
]]>
</mx:Script>
<mx:XML source="http://Path/To/XML.aspx" id="TreeXML"/>
<mx:Tree id="tvwProjects" width="100%" height="100%"
dataProvider="{myXLC}" labelField="@label" itemClick="treeClickEvent
(event);" y="10">
</mx:Tree>
************END OF CODE*******************
I've also tried the above without the XMLListCollection and just
putting the TreeXML straight into the Tree object dataProvider. The
afterComp function is called in the application createCompletion
event. I've also tried with and without invalidateList.
Basically, How can I get the Tree control to grab the latest and
greatest from the XML?
Thanks,
Aaron
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/