Posted by
Bart Ottenkamp on
Jul 16, 2009; 11:19pm
URL: https://discuss.orbeon.com/From-java-servlet-to-orbeon-context-tp44958p44960.html
Hello Alex,
thank you very much for replying this fast.
Never thought of that! Thanks for this, because this is exactly what I want; get the power of the xforms/submission (filtering al irrelevant nodes) and still end up in my own servlet and start doing my own things...
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...
Well, I guess my question is, do you know of this problem or don't you know the proble but do you know a way to present a pdf to the user and not loose data when hitting back and forward buttons...
To be even more preciseI I seem to not be able to present the user of an xforms form a pdf presentation of what her or she filled in whithout loosing the ability to go back to the form, change something and see again...
Can you help?
Best regards,
Bart
On Thu, Jul 16, 2009 at 9:51 AM, Alessandro Vernet
<[hidden email]> wrote:
Bart,
bartottenkamp wrote:
>
> I'm looking for is a way to get a hold on a model instance (an xml
> instance)
> in a 'normal' servlet living in the same container as my orbeon
> processors.
> I think I should be able to derive it using the sessionid from the request
> to my servlet I think?
> Does anybody know how I'll do that?
> I think I should start with getting the orbeon context?
>
> So, in my xhtml file I have this instance:
>
> <xforms:instance id = "form-instance">
> <form name = "AAAAA">
> <formcontent>
> ........
> </formcontent>
> </form>
> </forms:instance>
>
> which is the instance that holds my form data and for which the state is
> kept on the server.
>
If you'd like to access in your servlet to an instance with the data entered
by the user in an XForms form, then you need to submit the instance from
XForms to your servlet with an <xforms:submission>. Here your servlet living
in the same web app doesn't really make a difference. I hope this helps,
Alex
-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--
View this message in context: http://www.nabble.com/From-java-servlet-to-orbeon-context-tp24479768p24511946.html
Sent from the ObjectWeb 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
--
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