I advise setting resultFormat=”e4x” and using result and fault handlers, instead of binding directly to lastResult.  That way is easier to debug.

 

I have an example on CFLEX that uses HTTPService, aspx or jsp to retrieve and save an xml file.

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of meathead
Sent: Wednesday, November 01, 2006 2:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree not updating with correct XML

 

You pretty much answered my question when you stated that the XML
tag gets set during compiled time. I was thinking I might have to
use an HTTPService tag since the XML.aspx file will have different
results depending on the time of day per user. Bummer we can't just
reset the XML tag. Thanks for the prompt reply. Off to go learn
how to send in data to a tree via HTTPService.

Aaron
--- In [EMAIL PROTECTED]ups.com, "Michael Labriola" <[EMAIL PROTECTED].>
wrote:
>
>
> Aaron,
>
> Need to clarify something:
>
> When you say : The XML is changes, do you mean that the XML data
> retrieved from http://Path/To/XML.aspx changes or that you change
the
> XMl after loading at the client?
>
> I don't want to answer the wrong question, but the
> mx:XML tag includes data at compile time, not runtime. So, the
> application is going to grab a copy of this data when it compiles
and
> build it in.
>
> If you are looking to grab data at runtime, you need to look at
> something like an HTTP service tag to go and grab the data on
command.
>
> Let me know if this answers your question,
> --Mike
>
>
>
> --- In [EMAIL PROTECTED]ups.com, "meathead" <makacos@> wrote:
> >
> > 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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to