Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
maxkool #1
refreshing data
Hello all,
All I would like to do is to refresh a xml model every 5 mins or so( since the
xml file will be updated every 5 mins or so as well) I have found some exampels
of how to do this but they where way overly complex for my simple needs. I know
to use set interval but I'm not sure how to use that in tandem with a data
service.
Thanks!
Jorge
maxkool Guest
-
Real-time refreshing data
Hello everybody, i have a swf file, with a simple mx:List i have to refresh this list when an user will click to a link on my website. Example:... -
Refreshing chart data doesnt update chart
I must be missing something simple here. I have a column chart that is using an array for its dataprovider. However, when I update the underlying... -
Refreshing a page to display change in data
I have a page that scrolls out information from a database. When one of the records has been completed by the user, they press delete at the end of... -
Refreshing a Page
I have a menu that calls a specific asp page and passes a variable data1page.asp?year=2001 where the value of the year variable is determined... -
refreshing a checkbox
I posted this in a google google group and havent had any luck as of yet. Maybe you guys can help me. I have a list box that gets it data from a... -
maxkool #2
Re: refreshing data
here is the code im trying to run below:
i know it is something very simple, but i'm racking my brains!!
thanks
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"
creationComplete="startApp()">
<mx:Model id="crimeModel2" source="data/ticker.xml"/>
<mx:Script>
<![CDATA[
function startApp()
{
setInterval(this,"getData",5000);
}
function getData() {
crimeModel2.item();
}
]]>
</mx:Script>
<mx:DataGrid id="output" dataProvider="{crimeModel2.item}">
</mx:DataGrid>
</mx:Application>
maxkool Guest
-
maxkool #3
Re: refreshing data
Hello,
I'm trying to overcome the same issue, only I need to do it with a xml model. Is that even possible?
Thanks
maxkool Guest
-
Carson Hager #4
Re: refreshing data
Are you certain that the XML file hasn't been cached? I bet it has. To see
this for sure, see what the HTTP status code is on the response from your
web server. I bet it's indicating that it has been cached.
Carson
____________________________________________
Carson Hager
Cynergy Systems, Inc.
[url]http://www.cynergysystems.com[/url]
Adobe Flex Alliance Solutions Partner
Email: [email]carson.hager@cynergysystems.com[/email]
Office: 866-CYNERGY
Mobile: 1.703.489.6466
"maxkool" <webforumsuser@macromedia.com> wrote in message
news:dsqjfk$lqs$1@forums.macromedia.com...> Hello,
>
> I'm trying to overcome the same issue, only I need to do it with a xml
> model. Is that even possible?
>
> Thanks
Carson Hager Guest
-
ntsiii #5
Re: refreshing data
Did you figure this out?
You will not be able to use source=, because that is a compile time
assignment. Instead, you need to use HTTPService.
You will call the service's send() method from your getData() function.
Either bind the model to the HTTPService result, or, as is my preference, use a
result handler and assign the result to whatever you want. This is easier to
debug than binding.
Getting data in Flex is, sadly, never very simple.
Tracy
ntsiii Guest
-
maxkool #6
Re: refreshing data
Hello,
Sorry it's talen me so long to get back to you. Yes, I did figure out the
whole refresh thing:
Here is a short example I didnt want to take up too much space on the forum:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
marginTop="0"
marginBottom="0"
marginLeft="0"
marginRight="0"
height="100%" width="100%" xmlns:local="*"
initialize="myHTTPData.send();trace('calling service');"
backgroundColor="#cccccc"
creationComplete="startApp()">
<mx:HTTPService url="link to xml data source" id="myHTTPData" method="GET"
result="refreshdata">
</mx:HTTPService>
<mx:Script>
<!]>
</mx:Script>
i hope this helps other guys in the same boat i was in
jorge
maxkool Guest



Reply With Quote

