Le lundi 14 novembre 2005 à 19:45 +0100, Erik Bruchez a écrit :
> Eric van der Vlist wrote: > > >>If you want to submit something and do not expect a result, then use > >>"none". If you want to submit something and obtain a new XForms > >>instance as a result, use "instance". In these cases, the page does > >>not reload in your browser: submission is done through Ajax. > > > > > > That's pretty handy! > > I would say it's more than that! It's really one of the strongest and > coolest features of XForms. meant is that this is very nice that the new architectures allows that. > You can call XML services this way. The WG > is (at least was) also discussing helping make SOAP calls using the > XForms submission. At any rate, this opens many possibilities very > much in line with what people are looking for in Ajax. I am not a big fan of SOAP, but I see what you mean... > > > That's what I had understood. The reason I am asking that is that I am > > not able to make the following example work: > > > The server behaves like if the page "/sandbox/save" was never reached: > > the document "instance.xml" is never updated and there is no error > > message of any type if save.xpl doesn't exist... > > > > I have also tried calling save.xpl in an action instead than calling it > > as a model without any visible difference... > > > > What I have missed? > > I don't know for sure, because I ran your code, and it appears to be > working. The instance is saved on disk :-) change anything. > But this is what I think is happening: > > o You must have some error occurring when runing save.xpl. If that's > the case, you should see an exception in your logs. I don't see any exception in the logs... > o Because of the "optimized" local submission, in the particular case > of replace"none", we use the Servlet API's include() method. And > what do I read in the spec: "The target servlet of the include > method [...] cannot set headers or call any method that affects the > headers of the response. Any attempt to do so must be ignored." So > we don't catch that error. > > o Therefore, we send the xforms-submission-done event, as if > everything had been fine. here is a case where this optimized > submission should probably not be used... With the new option to > turn off this optimized submission in place, it works, and the error > is caught. > > o But in general, the XForms server fires an xforms-submit-error > event, which you can catch, for example with: > > <xforms:instance id="status"> > <message xmlns=""/> > </xforms:instance> > > <xforms:submission id="b" method="post" replace="none" > action="/evdv3/save"> > <xforms:setvalue ev:event="xforms-submit-error" > ref="instance('status')">Submission failed!</xforms:setvalue> > <xforms:setvalue ev:event="xforms-submit-done" > ref="instance('status')">Submission succeeded!</xforms:setvalue> > </xforms:submission> > > <p> > Status: <xforms:output ref="instance('status')"/> > </p> > > What resource manager are you using? > What happens if you use a "file:" > scheme instead of an "oxf:" scheme with the URL serializer? I see no difference. OTH, when I use the same "save.xpl" pipe through a submission done with replace="all", the file is written correctly (even with the oxf: protocol). That's this difference of behavior that made me ask how to make the link between a submission with replace="none" or "instance" and a pipe! Eric -- Le premier annuaire des apiculteurs 100% XML! http://apiculteurs.info/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Le lundi 14 novembre 2005 à 22:11 +0100, Eric van der Vlist a écrit :
> OTH, when I use the same "save.xpl" pipe through a submission done with > replace="all", the file is written correctly (even with the oxf: > protocol). I was running OPS with Jetty and I can't reproduce the problem with Tomcat! This is the first time I am hitting a problem that is specific to Jetty with OPS... And the system is so complex that I am wondering how I can even describe the issue to the jetty folks! Eric -- Don't you think all these XML schema languages should work together? http://dsdl.org ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Le lundi 14 novembre 2005 à 19:45 +0100, Erik Bruchez a écrit :
> What resource manager are you using? What happens if you use a "file:" > scheme instead of an "oxf:" scheme with the URL serializer? The > problem is probably linked to the issue you mentioned in another > thread with the URL serializer. BTW, was I right in my guesses in that other thread and is there a way to use the oxf: protocol for the filesystem.sandbox-directory parameter? Thanks, Eric -- Don't you think all these XML schema languages should work together? http://dsdl.org ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Eric van der Vlist
Eric van der Vlist wrote:
> Le lundi 14 novembre 2005 ? 22:11 +0100, Eric van der Vlist a ?crit : > > >>OTH, when I use the same "save.xpl" pipe through a submission done with >>replace="all", the file is written correctly (even with the oxf: >>protocol). > > > I was running OPS with Jetty and I can't reproduce the problem with > Tomcat! > > This is the first time I am hitting a problem that is specific to Jetty > with OPS... And the system is so complex that I am wondering how I can > even describe the issue to the jetty folks! This likely has to do with the RequestDispatcher.include() method and/or the way we handle the Request and Response objects passed to that method. This said, if you now switch to a new unstable build and disable optimized local submissions with this, you should be fine: <property as="xs:boolean" name="oxf.xforms.optimize-local-submission" value="false"/> -Erik -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |