Hello everyone!
I'm newbie in XForms and Orbeon framework. I read the documentation so far but I still got some problems in using Orbeon and the seperate deployment setup as described here. First of all im using 3.7beta1 and Tomcat 5.5 because the 3.6 release is not working with Firefox 3.x. Futhermore there's no org.orbeon.oxf.servlet.OrbeonXFormsFilter in the orbeon-xforms-filter.jar as described in the documentation, neither in 3.6 nor in 3.7. There's only the deprecated (?) OPSXFormsFilter. The filter class should be used is solely available in the nightly build. Back to my problem how to display a response result page. Using a simple CalulatorServlet which has the easy task to add two numbers an display it's result will not work as expected. After submitting the xform and printing the reuslt of calculation to response.getWriter() nothing happens. I'd decalared the CalculatorServlet servlet in web.xml and tried submitting with (both) post and get: <xforms:instance id="calculator-instance"> <calculator xmlns=""> <x/> <y/> </calculator> </xforms:instance> ... <xforms:submission id="calc" method="get" replace="instance" ref="instance('calculator-instance')" action="http://localhost:8080/mywebapp/calc"> </xforms:submission> The only way to call the servlet is to use the complete url. Otherwise the context will be /orbeon. When using POST the request.getParametersMap() is empty, but the complete model-instance can be read in request.getInputStream(): <?xml version="1.0" encoding="UTF-8"?> <calculator xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms"> <x>1</x> <y>2</y> </calculator> When using the GET method the size of the request.getParametersMap() is one (key = 'x', value = (something like) '1;y=2') But I still didn't find a way to display the result of calculation (here 1+2=3 ;-)). Nothing will happen. The page will not be reloaded. So please help. If you need further information please let me know. Best Regards and thanks for help Max |
Administrator
|
Max,
That's right, and I'd recommend you to use nightly builds at this point. We are very close now to releasing a new beta, and a (large!) number of issues have been fixed since the last beta. That's right: if you use a POST, the XML is "posted" to the service over HTTP, and found in the body of the HTTP request. Is your servlet returning an XML document? It should return something like <result>3</result>. Then you can access that XML document from an instance in XForms. Alex |
Thanks for promt reply. No the result is a simple "text/html" document. Does this mean, it's only possible to display the result by using a xfrom instance (I'll try this)? My final purpose is to generate pdf documents automatically by using xfroms. The user should fill out a form an receive an appropriate pdf file as result - how do do that? Thanking you in anticipation |
Administrator
|
> No the result is a simple "text/html" document. Does this mean, it's
> only > possible to display the result by using a xfrom instance (I'll try > this)? My > final purpose is to generate pdf documents automatically by using > xfroms. > The user should fill out a form an receive an appropriate pdf file > as result > - how do do that? Your question is a bit generic, but Form Runner does all this out of the box. Check out a nightly build and look at the Bookshelf form. It produces an editable view, a read-only HTML view, and a PDF view as well. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.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 |
Free forum by Nabble | Edit this page |