Login  Register

Exception in xforms.js

Posted by Ralf Jung on Mar 10, 2011; 1:06pm
URL: https://discuss.orbeon.com/Exception-in-xforms-js-tp3345793.html

Hi list,

I am using Orbeon CE 3.8.0, and I am experiencing weird behaviour wrt upload
controls: I am using an <xforms:upload> control to allow the data to load an
instance that was previously saved (using <xforms:output
appearance="xxforms:download") - thanks a lot for those useful features!
This is the submission dealing with the upload (I mapped the "xf" prefix to the
xforms namespace):
        <xf:submission id="upload-query-submission" ref="instance('upload')"
validate="false"
                        relevant="false" method="post" replace="none" resource="test:">
                  <xf:action ev:event="xforms-submit-done">
                                <xf:insert nodeset="instance('search-query-instance')"
origin="saxon:parse(saxon:base64Binary-to-
string(xs:base64Binary(instance('upload')), 'UTF-8'))"/>
                                <!-- <xf:send submission="search-submission"/> -->
                   </xf:action>
        </xf:submission>
If I now upload a file containing a valid query, the search dialogue is filled
correctly, and if I hit the button which triggers the "search-submission",
everything works as expected (the query is fed through a custom Java
processor, which outputs an XPath condition, that is sent to an eXist DB, and
the reply is a list of matching items). If however I enable that line I
commented out above, and directly send the search-submission after the upload
is finished, I get a very weird error message shown in the client:
    * Message: element is undefined
    * File: http://localhost:8080/roteliste/ops/javascript/xforms.js
    * Line number: 509
That line is the first line of the Orbeon.util.Dom.getStringValue function (I
am using the uncompressed JS to be able to debug this). Firebug reveals that
the element parameter of that function is actually null. The calling function
is handleResponseDom, line 7293 - the "error message" case. The DOM looks
quite complicated in Firebug (maybe there's a special DOM view, don't know),
but I can see the error message comes from Firefox itself (it also shows up in
the error console), and it complains about an "undefined entity" in column 1070
of the response from the XForms server. That entity seems to be &nbsp; -
however, the usual indicator ------^ completely fails here, so I hope I
assembled that correctly in my editor.
Any ideas what could be going on here?

Kind regards,
Ralf Jung


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws