builder.refresh method sometimes leaves blank values when datasource is changed.

NEW
Unassigned

Status

()

--
minor
15 years ago
10 years ago

People

(Reporter: hveluwenkamp, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421

When calling the builder.refresh method after changing the RDF datasource, the
updated widget has blanks where the updated values should appear. Sounds similar
to bug 68306, but calling builder.rebuild does not alleviate the problem.

Reproducible: Always
Steps to Reproduce:
1. load XUL file that uses RDF datasource and view result
2. change the RDF datasource
3. call builder.refresh on the element and view changes


Actual Results:  
Blank values appear in places where data has changes

Expected Results:  
Display the changes.
(Reporter)

Comment 1

15 years ago
> When calling the builder.refresh method after changing the RDF datasource, the
> updated widget has blanks where the updated values should appear. Sounds similar
> to bug 68306, but calling builder.rebuild does not alleviate the problem.
> 

Using SetTimeout to call builder.rebuild after 100ms does work however.

Comment 2

15 years ago
This probably is some bizarre combination with the XUL template code and the
mark+sweep algorithm used in the remote datasource. Does this happen for all
templates, or only dont-build-content templates?

Patches welcome...
Assignee: nobody → varga
Severity: normal → minor
Status: UNCONFIRMED → NEW
Component: RDF → XP Toolkit/Widgets: Trees
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: core.rdf
Hardware: PC → All
(Reporter)

Comment 3

15 years ago
Created attachment 147177 [details]
Test case for disappearing values.

Test case for disappearing values. To view load 'bug.xul', then change
'object.rdf' datasource. Hit Refresh button and note that changed value(s) will
be blank in the browser (more often than not, that is.)

Comment 4

15 years ago
Refresh() is an asynchronous operation. So calling rebuild() just can't work.
You could use the hacky setTimeout() solution or you could add
nsIRDFXMLSinkObserver to listen for onEndLoad() and call rebuild in this method.

Or ...
change Refresh() to Refresh(boolean aSynch)
Assignee: varga → bsmedberg

Comment 5

15 years ago
Interesting enough that 
nsXULTemplateBuilder::Refresh
actually calls Rebuild, see
http://lxr.mozilla.org/seamonkey/source/content/xul/templates/src/nsXULTemplateBuilder.cpp#265

Smells like a bug to me.

Do we need an observer method for adding/removing of datasources in composite
datasources?

Comment 6

15 years ago
I think this is a dupe of 68306. There's even an analysis in bug 68306.

>Do we need an observer method for adding/removing of datasources in composite
>datasources?

hmm, I don't see a need for it ATM.
(Reporter)

Comment 7

15 years ago
My understanding (which may be incorrect) is that this feature was added to
moz1.7 to allow remote XUL apps to refresh RDF datasources (no extra security
privileges.) Therefore any solution should work within this context.

Comment 8

14 years ago
I have also seen this problem, I shall be making a work-around.

Updated

13 years ago
Assignee: benjamin → nobody

Updated

10 years ago
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.