Closed Bug 458049 Opened 17 years ago Closed 15 years ago

Implement builder.refresh for non-rdf datasources

Categories

(Firefox :: General, defect)

3.0 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: xul, Unassigned)

References

()

Details

(Whiteboard: [CLOSEME 2010-11-01])

User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.3) Gecko/2008092515 Ubuntu/8.10 (intrepid) Firefox/3.0.3 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.3) Gecko/2008092515 Ubuntu/8.10 (intrepid) Firefox/3.0.3 Adding a scripted builder.refresh() to the listbox in the example at the attached URL causes an exception to be thrown. This is the simplest example I could prepare that produces this bug, but it is affected a more complex, nested tree that I am trying to create via XML templates too. The tree creates fine, and populates from the remote XML datasource fine also... but only when initially loaded. Attempting to refresh the data with builder.refresh() results in the exception. Using RDF instead of XML templates happily works with builder.refresh(). Reproducible: Always Steps to Reproduce: var el = document.getElementById("people_listbox"); el.builder.refresh(); Actual Results: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXULTemplateBuilder.refresh]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:8000/static/people.xul :: refreshSrc :: line 12" data: no] Expected Results: That a request to the server was made, and the listbox was refreshed.
Version: unspecified → 3.0 Branch
As Mark Finkle suggested to me in #xul, using XMLHttpRequest and setting the builder.datasource works: var xhr = new XMLHttpRequest(); xhr.open("GET", "/static/people.xml", false); xhr.send(null); var el = document.getElementById("people_tree"); el.builder.datasource = xhr.responseXML; This can be called multiple times, and each time (depending on etag, cache-control etc), the request can be seen hitting the webserver. The listbox/tree repopulates, and no exceptions are thrown.
(In reply to comment #1) > As Mark Finkle suggested to me in #xul, using XMLHttpRequest and setting the > builder.datasource works: Neil, is this the "correct" way to handle updating a remote XML datasource?
The refresh method just hasn't been implemented for other datasources.
Summary: XUL XML template builder.refresh() throws exception 0x80004005 (NS_ERROR_FAILURE) [nsIXULTemplateBuilder.refresh] → Implement builder.refresh for non-rdf datasources
This is a mass search for Firefox General bugs filed against version 3.0 that are UNCO and have not been changed for 200 days. Reporter, please update to Firefox 3.6.10 or alter. Firefox 3.0 is no longer supported and is no longer receiving updates. After you update, please create a fresh profile, http://support.mozilla.com/kb/managing+profiles, and test to see if your bug still exists. If you still the bug, then please post a comment with the version you tested against, and the problem. If the issue is no longer there, please set the RESOLUTION to RESOLVED, WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.