Re: submission and XML

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/submission-and-XML-tp1577228p1580292.html

Bryan,

Instead of {instance('my-instance')}, use
{saxon:serialize(instance('my-instance'), 'xml')} to pass the instance
as a request parameter. But I would recommend against it. You are
better off POSTing the instance, and retrieving it from the body of
the POST in your Java code. Using dom4j, it is as simple as:

Document queryDocument = xmlReader.read(request.getInputStream());

Alex

On Wed, Mar 3, 2010 at 1:00 PM, Bryan <[hidden email]> wrote:

>
> if I have an instance (my actual instance is much more complicated that this
> example):
>
> <xforms:instance id="my-instance">
>     some data
> </xforms:instance>
>
> How do i submit that data to my spring controller so that it would reload
> the page and i should be able to get the xml instance via
> request.getParameter?
>
> I tried all combination of attributes in the xforms:submission and the
> closest i got was this:
>
> <xforms:submission id="my-submission"
>
> action="/xforms/mycontroller.gs?data={instance('my-instance')}"
>                       method="post" replace="all"/>
>
> when i do request.getParameter('data') in my controller,  i get some data
> but not in XML form.
>
>
> --
> View this message in context: http://n4.nabble.com/submission-and-XML-tp1577228p1577228.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
>
>


--
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