How to send parameter to a page that is not orbeon form..

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to send parameter to a page that is not orbeon form..

javaudvikling
Hi,

Can anyone help me with following issue:

I have following config in my properties-local.xml:

<property
  as="xs:string"
  name="oxf.fr.detail.process.send.*.*"
  value='require-uploads
         then validate-all
                 then save-draft
         then send("oxf.fr.detail.send")
                 then navigate("http://localhost:8080/dataservice/jsp/ok_kvittering.jsp")
                 recover error-message(message = "Blanketten ")'/>

<property as="xs:anyURI" name="oxf.fr.detail.send.uri.*.*" value="http://localhost:62203/api/Values/"/>


Everything works fine and my "ok_kvittering.jsp" page is also called without any problem.

My question is how do I send some parameters from the form to my "ok_kvittering.jsp" page when the user press the send button.

thanks in advance..

Regards
Balatharan

Reply | Threaded
Open this post in threaded view
|

Re: How to send parameter to a page that is not orbeon form..

Alessandro  Vernet
Administrator
Hi Balatharan,

You can't send parameters with navigate(). For this, you would need to use a send() with replace="all". This way the data sent to your service is sent by Orbeon Forms (and doesn't go through the browser), for improved security. Would using send() and having the resulting service return HTML work for you?

https://github.com/orbeon/orbeon-forms/wiki/Form-Runner:-Buttons-and-Processes#send

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to send parameter to a page that is not orbeon form..

javaudvikling
Hi Alex,

Thanks for your answer.

I tried to implement the sample from your wiki link, but have some problem doing it correct..
Could you give me a small sample of how to implement this solution on with following param: CodeId, serviceId and NameDia

I'm using Orbeon 4.4.

Thanks in advance..


Balatharan
Reply | Threaded
Open this post in threaded view
|

Re: How to send parameter to a page that is not orbeon form..

Alessandro  Vernet
Administrator
Hi Balatharan,

When using send(), the whole instance will be posted to your service, so your service can just extract the data from the XML it receives in the body of the HTTP request. If you prefer to have the values as request parameters, you can do so since 4.4 as oxf.fr.detail.send.success.uri.*.* is now evaluated as an AVT; see the example passing the email as a request parameter on:

https://github.com/orbeon/orbeon-forms/wiki/Form-Runner:-Buttons-and-Processes#send

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet