sidewinderlabs / backplanejs

Other
12 stars 3 forks source link

xf:submission with @method="post" and @replace="all" causes popup error #73

Open backplane-import opened 13 years ago

backplane-import commented 13 years ago

Imported from backplanejs Google Code issue 73.

Reporter alex.sansom@webbackplane.com
Date 12 Jul 2010 4:38:30 PM UTC

Attached forms demonstrate that when using Internet Explorer and trying to do a POST submission of instance data to a resource, errors occur.

When running the attached files on a local webserver, I expect clicking "Submit" in the test-submission-POST.html form to do the following:

Currently the following happens:

I've attached the screen shots, the test-submission-POST.html and echo.aspx files that show the behaviour described above.

screen-shot-1.gif shows the results when the formsPlayer plugin is used with the form. I have also attached that form, test-submmission-POST-fp.html.


Priority: High Type: Defect


Attachments

echo.aspx (592 bytes) test-submission-POST-fp.html (1.2 KB) test-submission-POST.html (1.2 KB) screen-shot-1.gif (34.4 KB) screen-shot-2.gif (53.8 KB)

backplane-import commented 13 years ago

Comment by markbirbeck on 15 Jul 2010 3:37:54 PM UTC

Setting module label to 'XForms' and accepting the issue. Also marking it as 'critical' since it is crucial for 1st Software's forms.


Updates

Ticket status set to Accepted

Module: XForms Priority: High → Critical

backplane-import commented 13 years ago

Comment by creaven on 4 Aug 2010 3:50:01 PM UTC

errors fixed in http://code.google.com/r/creavenmoro-backplanejs/source/detail?r=9b227d991bef8bccce3ce9b7a3240c491eed4e5c

now it works as described here: http://www.w3.org/TR/2003/REC-xforms-20031014/slice11.html

"For a success response including a body, when the value of the replace attribute on element submission is "all", the event xforms-submit-done is dispatched, and submit processing concludes with entire containing document being replaced with the returned body."

It replaces current document (using document.write):

//submission.prototype.processResult case "all": oObserver.ownerDocument.logger.log("@replace = 'all'", "submission");

if (oResult.method === "PUT") {
    document.location.href = oResult.resourceURI;
} else {
    this.replaceDocumentContent(sData); // replace document
}
break;

//submission.prototype.replaceDocumentContent document.write(data); document.close();

backplane-import commented 13 years ago

Update by markbirbeck on 4 Aug 2010 5:45:41 PM UTC

Owner set to creaven

Ticket status set to FixPending