I advise not binding directly to lastResult for this very reason: it is
difficult to debug.

 

Instead, use a result handler function. In that you can trace or
otherwise examine the data you get back.  If it is the same, then you
have the cache issue.

 

I have been told that POST calls do not cache, but GET does.
HTTPService defaults to GET, and uses GET if the post body is empty.

 

Another common solution to cache issues is to append some unique string
to the url.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of meathead
Sent: Monday, January 29, 2007 4:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTPService not updating tilelist itemrenderer

 

Hi all,

I've searched and searched and I can't figure this out.

I've got a HTTPService to call XML from a SQL Server database and 
populate a TileList with LinkButtons using an itemrenderer. This 
works peachy keen. I am also able to click a button and add an 
entry to my database. This also works very swell. However, I can 
not get the TileList to update with the new entry when I close my 
TitleWindow from which I send my new entry to the database from. 
I'm trying to figure out if the HTTPService is cacheing somehow or 
if itemrenderer needs to be refreshed, or if it's something 
completely different. I'm pretty sure it's the HTTPService because, 
when I add the new database item by hand the HTTPService is not 
refreshing when recalling the send. I've tried closing the Service 
and disconnecting but to no avail. Basically, it's not updating. 
Here is some code.....

******LinkButton component named "TagLink"********8
<mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 
label="{data.Tag}" height="25" width="90" color="blue" >
</mx:LinkButton>

********HTTPService************ 
<mx:HTTPService id="rstTag" 
url="http://sycorax/KDA/XMLPhotoTags.aspx?File=1
<http://sycorax/KDA/XMLPhotoTags.aspx?File=1> " useProxy="false"/>

********and subsequent call when user clicks a list*********
rstTag.url = "http://Some/LocalServer/XMLpage.aspx?File=
<http://Some/LocalServer/XMLpage.aspx?File=> " + 
rlstThumbs.selectedItem.FileID.toString();
rstTag.send();

********TileWindow and TileList*****
<mx:TitleWindow width="25%" height="29" layout="absolute" 
id="twinTags" title="Tags" alpha=".25" left="0" top="0" 
click="TagListClick();">
<mx:TileList id="tlstTags" itemRenderer="TagLink" change="SendTags
();" dataProvider="{rstTag.lastResult.FileID.Tag}">
</mx:TileList>
</mx:TitleWindow>

Thanks in advance.
Aaron

 

Reply via email to