This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
Martin, You can control the "Loading..." message with the submission atrribute xxforms:show-progress="false" . as to the change in behavior of incremental elements I don't know, but what are the other attributes of your submission, such as the replace attribute? Regards, Louis (Hank) Ratzesberger Quoting Martijn Slob <[hidden email]>: > > I have been thinking, reading and experimenting for some time now, but just > can not find a solution for the following problem. Forgive me if it turns > out to be a trivial thing: > > I have created a web-application using Orbeon Forms that can be used to > generate PDF documents from the input the user entered. In that app there > exists a button 'Generate' which will submit the xml content to a servlet, > which generates and returns the requested PDF. The user should be prompted > with the (normal) response that he can see or save the PDF. However, the > user should not leave the application as he must be able to adjust the input > and generate the PDF again. > > Untill now I have the following solutions, all with their problems > > 1) Perform a normal <xforms:submission ...>. > Indeed, the user can see or save the PDF. However, the 'Loading...' bar > (upper right of the window) never disappears anymore. Also, the app does not > function the same as before: elements with 'incremental="true"' operate as > if 'incremental="false" '. I suspect that the server assumes that the app is > no longer active, since it was replaced by a new page (not knowing that this > was actually just a pdf file). > > 2) use a standard HTML form to do the POST-request to the servlet. This was, > I can bypass the Orbeon server and my app will function as before. But > somehow, the submit button of this form is dead. Nothing is submitted. If I > use the same <form>.. code in a plain HTML file it works, but not when it is > inside an Orbeon app. Is this known/normal/wanted? > > Anyone out there who can point me in the right direction? > > Martijn > > > -- > View this message in context: > http://orbeon-forms-ops-users.24843.n4.nabble.com/Download-binary-content-from-XForms-app-tp2227057p2227057.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > -- Hank Ratzesberger [hidden email] -- 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 |
In reply to this post by Martijn Slob
Hi Martijn,
On Sat, May 22, 2010 at 02:55:32AM -0700, Martijn Slob wrote: > > I have been thinking, reading and experimenting for some time now, but just > can not find a solution for the following problem. Forgive me if it turns > out to be a trivial thing: > > I have created a web-application using Orbeon Forms that can be used to > generate PDF documents from the input the user entered. In that app there > exists a button 'Generate' which will submit the xml content to a servlet, > which generates and returns the requested PDF. The user should be prompted > with the (normal) response that he can see or save the PDF. However, the > user should not leave the application as he must be able to adjust the input > and generate the PDF again. > > Untill now I have the following solutions, all with their problems > > 1) Perform a normal <xforms:submission ...>. > Indeed, the user can see or save the PDF. However, the 'Loading...' bar > (upper right of the window) never disappears anymore. Also, the app does not > function the same as before: elements with 'incremental="true"' operate as > if 'incremental="false" '. I suspect that the server assumes that the app is > no longer active, since it was replaced by a new page (not knowing that this > was actually just a pdf file). an xforms:submission with replace="all", and had the servlet return the PDF content but with an HTTP header like... Content-Disposition: attachment; filename="foo.pdf" ...? Maybe it wouldn't help, just a thought. Cheers Alistair > > 2) use a standard HTML form to do the POST-request to the servlet. This was, > I can bypass the Orbeon server and my app will function as before. But > somehow, the submit button of this form is dead. Nothing is submitted. If I > use the same <form>.. code in a plain HTML file it works, but not when it is > inside an Orbeon app. Is this known/normal/wanted? > > Anyone out there who can point me in the right direction? > > Martijn > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Download-binary-content-from-XForms-app-tp2227057p2227057.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > -- > 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 -- Alistair Miles Head of Epidemiological Informatics Centre for Genomics and Global Health <http://cggh.org> The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Web: http://purl.org/net/aliman Email: [hidden email] Tel: +44 (0)1865 287669 -- 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 |
Administrator
|
Alistair,
You would want to put the Content-Disposition header when serving the PDF to the browser, but as Hank mentioned earlier, you also need the xxforms:show-progress="false" to prevent the loading indicator from staying on the page when the PDF is served to the browser. Alex On Mon, May 24, 2010 at 8:38 AM, Alistair Miles <[hidden email]> wrote: > Hi Martijn, > > On Sat, May 22, 2010 at 02:55:32AM -0700, Martijn Slob wrote: >> >> I have been thinking, reading and experimenting for some time now, but just >> can not find a solution for the following problem. Forgive me if it turns >> out to be a trivial thing: >> >> I have created a web-application using Orbeon Forms that can be used to >> generate PDF documents from the input the user entered. In that app there >> exists a button 'Generate' which will submit the xml content to a servlet, >> which generates and returns the requested PDF. The user should be prompted >> with the (normal) response that he can see or save the PDF. However, the >> user should not leave the application as he must be able to adjust the input >> and generate the PDF again. >> >> Untill now I have the following solutions, all with their problems >> >> 1) Perform a normal <xforms:submission ...>. >> Indeed, the user can see or save the PDF. However, the 'Loading...' bar >> (upper right of the window) never disappears anymore. Also, the app does not >> function the same as before: elements with 'incremental="true"' operate as >> if 'incremental="false" '. I suspect that the server assumes that the app is >> no longer active, since it was replaced by a new page (not knowing that this >> was actually just a pdf file). > > I'm not an orbeon expert, but I wonder what would happen if you used > an xforms:submission with replace="all", and had the servlet return > the PDF content but with an HTTP header like... > > Content-Disposition: attachment; filename="foo.pdf" > > ...? Maybe it wouldn't help, just a thought. > > Cheers > > Alistair > >> >> 2) use a standard HTML form to do the POST-request to the servlet. This was, >> I can bypass the Orbeon server and my app will function as before. But >> somehow, the submit button of this form is dead. Nothing is submitted. If I >> use the same <form>.. code in a plain HTML file it works, but not when it is >> inside an Orbeon app. Is this known/normal/wanted? >> >> Anyone out there who can point me in the right direction? >> >> Martijn >> >> >> -- >> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Download-binary-content-from-XForms-app-tp2227057p2227057.html >> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > >> >> -- >> 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 > > > -- > Alistair Miles > Head of Epidemiological Informatics > Centre for Genomics and Global Health <http://cggh.org> > The Wellcome Trust Centre for Human Genetics > Roosevelt Drive > Oxford > OX3 7BN > United Kingdom > Web: http://purl.org/net/aliman > Email: [hidden email] > Tel: +44 (0)1865 287669 > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
On Mon, May 24, 2010 at 06:11:25PM -0700, Alessandro Vernet wrote:
> Alistair, > > You would want to put the Content-Disposition header when serving the > PDF to the browser, but as Hank mentioned earlier, you also need the > xxforms:show-progress="false" to prevent the loading indicator from > staying on the page when the PDF is served to the browser. Thanks, very useful to know :) Alistair > > Alex > > On Mon, May 24, 2010 at 8:38 AM, Alistair Miles > <[hidden email]> wrote: > > Hi Martijn, > > > > On Sat, May 22, 2010 at 02:55:32AM -0700, Martijn Slob wrote: > >> > >> I have been thinking, reading and experimenting for some time now, but just > >> can not find a solution for the following problem. Forgive me if it turns > >> out to be a trivial thing: > >> > >> I have created a web-application using Orbeon Forms that can be used to > >> generate PDF documents from the input the user entered. In that app there > >> exists a button 'Generate' which will submit the xml content to a servlet, > >> which generates and returns the requested PDF. The user should be prompted > >> with the (normal) response that he can see or save the PDF. However, the > >> user should not leave the application as he must be able to adjust the input > >> and generate the PDF again. > >> > >> Untill now I have the following solutions, all with their problems > >> > >> 1) Perform a normal <xforms:submission ...>. > >> Indeed, the user can see or save the PDF. However, the 'Loading...' bar > >> (upper right of the window) never disappears anymore. Also, the app does not > >> function the same as before: elements with 'incremental="true"' operate as > >> if 'incremental="false" '. I suspect that the server assumes that the app is > >> no longer active, since it was replaced by a new page (not knowing that this > >> was actually just a pdf file). > > > > I'm not an orbeon expert, but I wonder what would happen if you used > > an xforms:submission with replace="all", and had the servlet return > > the PDF content but with an HTTP header like... > > > > Content-Disposition: attachment; filename="foo.pdf" > > > > ...? Maybe it wouldn't help, just a thought. > > > > Cheers > > > > Alistair > > > >> > >> 2) use a standard HTML form to do the POST-request to the servlet. This was, > >> I can bypass the Orbeon server and my app will function as before. But > >> somehow, the submit button of this form is dead. Nothing is submitted. If I > >> use the same <form>.. code in a plain HTML file it works, but not when it is > >> inside an Orbeon app. Is this known/normal/wanted? > >> > >> Anyone out there who can point me in the right direction? > >> > >> Martijn > >> > >> > >> -- > >> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Download-binary-content-from-XForms-app-tp2227057p2227057.html > >> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > >> > >> -- > >> 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 > > > > > > -- > > Alistair Miles > > Head of Epidemiological Informatics > > Centre for Genomics and Global Health <http://cggh.org> > > The Wellcome Trust Centre for Human Genetics > > Roosevelt Drive > > Oxford > > OX3 7BN > > United Kingdom > > Web: http://purl.org/net/aliman > > Email: [hidden email] > > Tel: +44 (0)1865 287669 > > > > > > -- > > 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 > > > > > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - > http://www.orbeon.com/ > My Twitter: http://twitter.com/avernet > > -- > 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 -- Alistair Miles Head of Epidemiological Informatics Centre for Genomics and Global Health <http://cggh.org> The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Web: http://purl.org/net/aliman Email: [hidden email] Tel: +44 (0)1865 287669 -- 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 |
Free forum by Nabble | Edit this page |