<output> data not updating

RESOLVED FIXED

Status

RESOLVED FIXED
13 years ago
2 years ago

People

(Reporter: stpride, Assigned: aaronr)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

1.74 KB, application/xhtml+xml
Details
2.13 KB, patch
smaug
: review+
Details | Diff | Splinter Review
(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050615 Firefox/1.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050615 Firefox/1.0+

Sorry if the summary is vague - I'll try to explain.

Go to the URL above using Mozila w/XForms.  Click on the "Stock order form (for
other XForms browsers)" link.  You should get a popup followed by another popup.
 A Stock order example page should then apear.  Enter a stock symbol (it doesn't
matter what).  Once focus is lost for the input control, an xforms-value-changed
event is fired which causes a submission to a remote web site to get some data.
 The data should come back and populate the <xf:output> controls.  In the status
bar of the browser, it shows data is being transferred to the remote site.

If the same is done using IE with formsPlayer and clicking on the example "Stock
order form (for formsPlayer)", the output is displayed properly.

Reproducible: Always

Actual Results:  
No data is displayed after a stock symbol is entered and focus is lost on the
input control.

Expected Results:  
User should the stock symbol information displayed after a stock symbol is
entered and focus is lost on the input control.
(Assignee)

Comment 1

13 years ago
The problem here is that instance replacement isn't working right.  This form
does a submission with instance replacement and the output is bound to this
instance so that when the data is returned, the output should be updated with
the result.  However our instance replacement only replaces instance in the
first instance document rather than the proper nodeset in the proper instance
document.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

13 years ago
Created attachment 186453 [details]
testcase

This is a simplified testcase.	If you click on the first trigger, let the
submission return and then click on the second trigger, you should see an
updated instance document with an IBM stock quote.
(Assignee)

Comment 3

13 years ago
Created attachment 186455 [details] [diff] [review]
first attempt

pretty simple fix.  Just find the instance element that holds the data this
submission is bound to and replace its document with the document we got from
the submission.
Attachment #186455 - Flags: review?(allan)
(Assignee)

Updated

13 years ago
Attachment #186455 - Flags: review?(doronr)

Comment 4

13 years ago
Comment on attachment 186455 [details] [diff] [review]
first attempt

looks fine
Attachment #186455 - Flags: review?(doronr) → review+

Comment 5

13 years ago
Comment on attachment 186455 [details] [diff] [review]
first attempt

>+  nsresult rv = GetSelectedInstanceData(getter_AddRefs(data));
>+  if (NS_SUCCEEDED(rv)) {

Why do we rebuild, etc. if GetSelectedInstanceData() fails?

>+    nsCOMPtr<nsIDOMNode> instanceNode;
>+    rv = nsXFormsUtils::GetInstanceNodeForData(data, model, getter_AddRefs(instanceNode));

Split line.

>+    NS_ENSURE_SUCCESS(rv, rv);
> 
>-  instance->SetDocument(newDoc);
>+    nsCOMPtr<nsIInstanceElementPrivate> instanceElement = 

Kill the whitespace at end of the line.

With a good answer to the first question, you have an r=me, but not before.
(Assignee)

Comment 6

13 years ago
Created attachment 187475 [details] [diff] [review]
second attempt

I can't remember why I still refreshed, etc. if I couldn't find the instance to
replace.  So moved that logic inside the test for the instance document.
Attachment #186455 - Attachment is obsolete: true
Attachment #187475 - Flags: review?(allan)
(Assignee)

Updated

13 years ago
Attachment #186455 - Flags: review?(allan)
(Assignee)

Comment 7

13 years ago
Comment on attachment 187475 [details] [diff] [review]
second attempt

Allan must be out on vacation.	Smaug?
Attachment #187475 - Flags: review?(allan) → review?(smaug)
(Assignee)

Comment 8

13 years ago
turns out that this patch doesn't work because of the bug fixed by 299283.  Once
299283 is in, this patch will work.
Depends on: 299283

Updated

13 years ago
Attachment #187475 - Flags: review?(smaug) → review+

Comment 9

13 years ago
checked in
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.