Login  Register

Re: Re: Re: Exception in xforms.js

Posted by Erik Bruchez on Mar 15, 2011; 5:04am
URL: https://discuss.orbeon.com/Exception-in-xforms-js-tp3345793p3355737.html

Ralf,

We have some doc on the differences between 3.8 and 3.9 uploads here:

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-controls/upload-control#TOC-With-Orbeon-Forms-3.9

3.9 no longer dispatches xforms-select, as  the upload now starts automatically. We could have kept xforms-select, but then with existing code that would trigger the "fake" submission hack used in 3.8, and that in turn could cause issues. So we decided instead to not dispatch xforms-select anymore, and to use new events to clearly indicate the start and end of an upload.

It is unfortunate that a code change is needed, but the upload implementation was changed in quite a major way and we are not sure a backward-compatible solution is possible (ideas welcome).

Now back to the original issue: what you say seems to indicate that there is an unescaped   in the response, and there probably shouldn't be one.

Can you see with Firebug what's the content of the Ajax or pseudl-Ajax response reaching the client? If not with Firebug, with HTTPScoop or similar:

http://wiki.orbeon.com/forms/doc/developer-guide/admin/monitoring-http-requests

Or, is there any way we can reproduce this locally?

-Erik

On Sat, Mar 12, 2011 at 3:28 AM, Ralf Jung <[hidden email]> wrote:
Hi Alex,

no, quite the opposite actually: Not even the previously working loading of
the instance works anymore. At least, not without any code changes. I get the
upload progress bar (which I don't really need, the files uploaded are never
more than 2KiB in size), but the action that's supposed to be taken when the
upload finished is never triggered - the data is not put into the instance. It
just halts after filling the bar to about 10%.
Does the old method of adding
<xf:send ev:event="xforms-select" submission="upload-report-submission"/>
and then taking action in the submission's xforms-submit-done event no longer
work? I can't really produce two different versions of my page, and the target
is definitely a stable Orbeon release, so 3.8 currently.

Kind regards,
Ralf

Am Freitag 11 März 2011, um 21:23:25 schrieb Alessandro Vernet:
> Ralf,
>
> We have greatly improved the upload in the last few months, and those
> changes will be in the 3.9 version, to be released soon. If it is
> possible for you to upgrade, could you try doing this with a nightly
> build, and tell us if it works better for you?
>
> Alex
>
> On Thu, Mar 10, 2011 at 5:06 AM, Ralf Jung <[hidden email]> wrote:
> > 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


--
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




--
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