A better approach (or at least more reliable) is to remove the datasource
from the xul tree (using template.database.RemoveDataSource), unregister the
datasource, then calling it again the same way you did in the first time.
This way you effectively force to refresh the content of the tree.

hope this helps


"ronan cremin" <[EMAIL PROTECTED]> escribi� en el mensaje
news:[EMAIL PROTECTED]
> Hi,
>
> Having a problem getting Mozilla to reload the contents of a remotely
> hosted RDF file used to populate a tree. The initial load of the RDF
> data works fine. The XUL app is hosted on the same HTTP server as the
> data, but the same problem also occurs if I run the app from the local
> file system.
>
> I'm using the following code to try to get he RDF to reload:
>
>     var dsource;
>     var template=document.getElementById("tree");
>     var sources=template.database.GetDataSources();
>     dsource=sources.getNext();
>     dsource.Refresh(true);
>
> The HTTP server (Apache) shows no activity, and even the initial load of
> the RDF when the app starts happens only very infrequently -- Mozilla
> seems to keep it cached between sessions. The XUL for the template that
> holds the data starts as follows:
>
> <tree id="tree" flex="1" width="200" height="200"
> datasources="http://localhost/xul/tasks.rdf"; ref="urn:tasks:data"
> onselect="loadArticle(this)">
>
> I've looked at other posts on this subject in the mozilla.rdf group and
> most threads seemed to end inconclusively.
>
> Does anybody have working code for a minimal XUL app that uses a remote
> datasource, with the ability to force a refresh of the RDF? The standard
> Mozilla duplicates.xul app does not appear to have a refresh function
> for the data source.
>
> Any suggestions would be most welcome.
>
> Thanks,
> Ronan
>



Reply via email to