Login  Register

Re: Re: From java servlet to orbeon context

Posted by Alessandro Vernet on Jul 16, 2009; 11:43pm
URL: https://discuss.orbeon.com/From-java-servlet-to-orbeon-context-tp44958p44961.html

Bart,

bartottenkamp wrote
Since you answereed me this quick though, here comes the next one.... :-):
To go short (cutting come corners), this is what I want:
I have my own java code to generate PDF documents (all generic, using IText
and FOP, creatng Pdf document for all kinds of forms). Now, what I want is
to be able to click on a link in an xforms form to generate this PDF (thus
basically activate my 'Pdf code, but that is the easy part...), present it
and NOT LOOSE the information filled in in the form by the user. The user
should be presented a pdf and if hitting the back button, the form should be
presented as it was before...
Of course I tried a couple of things, starting with simply putting the
generated pdf on the outputstream of a response from a servlet.. and this
worked, also with hiitting the back button, but I was working in FireFox 3
or IE 8... working with IE 7 or earlyer and hitting the back button gets me
back to the page BEFORE the xform I opened..! And I loose all information on
the screen when hiiting the forward button...
One way is to open the PDF in an new window. If you do this with an <xforms:submission replace="all"/>, add an xxforms:target="_blank" attribute.

Alex