Upload data from an external page in the Orbeon form

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

Upload data from an external page in the Orbeon form

inigo10rodri
Hello,

I would like to know if it is possible by configuring the properties,
creating a process or otherwise. Call another page from a link in the Orbeon
form, to fill in some data and then receive the data entered on the external
page within the Orbeon form.

Thank you,
Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Hi Iñigo,

There is a way for you to POST the entire form data to a `/new` page (see
1st link below). But doing so has downsides: you need to POST the *exact*
XML document used by the page, which can be a maintenance issue as you'll
then need to change that data every time the form is changed.

Instead, in most cases the value of individual fields is passed to the form,
either:
1. As request parameters, if exposing those values to users isn't a problem.
2. As header values set in a reverse proxy, if you don't want users to be
able to see or change those values.

And of course you can use a combination of both techniques. Then you set
form fields to those values using `xxf:get-request-parameter()` for the 1st
case (see 2nd link below), or `xxf:get-request-header()` for the 2nd case
(see 3rd link below).

You'll let me know if this works for you.

https://doc.orbeon.com/configuration/properties/form-runner/form-runner-detail-page#initial-data-posted-to-the-new-form-page
https://doc.orbeon.com/xforms/xpath/extension-functions/extension-http#xxf-get-request-parameter
https://doc.orbeon.com/xforms/xpath/extension-functions/extension-http#xxf-get-request-header

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Hi Iñigo, if this is still current, did you managed to pass information to
your form either as request parameters, or passing the whole data, per my
earlier message in this thread?


-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Hello Alessandro,

I'm sorry for not answering you before, I was on vacation and trying out the
options you were proposing.

I have managed to send parameters by URL from a jsp that I created and I can
show it on the Orbeon form the value passed from the other page.
The problem that I have now is that I need to keep the data of the form, so
that when returning from the external page it shows the data that the user
had entered.
Is there any way to do it?

Thank you very much,
Iñigo

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Hi Iñigo,

What do you mean by "keep the data of the form"? Are you saying that you
don't want the data you pass to the form not to be displayed to users?
(Maybe an example of what you'd like to create would help me understand the
issue you're trying to solve.)

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Hi Alessandro,

What I want to say is that I have different entries in the form and once I
complete them, I access the external page through a link.
I complete the information on the external page and return to the form. But
when I return from the external page, the data I entered previously
disappears.
So, the question is whether there is any way to keep that data in the form
so that when it comes back from the external page, the entries that were
completed are not empty and is keeped what I had written?

I hope I have explained it better and that you can understand it, thank you.

Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Hi Iñigo,

Are you setting the value of those fields with an XPath expression you put in "Initial Value"? I imagine that XPath would call `xxf:get-request-parameter('gaga')`, or something along those lines. Then the value will be stored in the form data, and will be kept. If you reload data you saved previously, the value still be there.

Are you doing something like this? Or am misunderstanding your situation?

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Hi Alessandro,

Yes, I'm setting the value of those fields with the XPATH expression to
catch the parameter passed by the URL. The problem is not there, the value
of the parameters passed by request are loaded well in the corresponding
fields.

Let's put ourselves in situation:

The first thing I do is fill in the details of the form. Once I have filled
and saved everything correctly, I access the external page by a link to make
the digital signature.
After signing I return to the form and that's where the problem is, I do not
know how to show the data I had entered before going to make the digital
signature.
I had thought to redirect to the edit page and pass the document_id as a
parameter but I can not get it. Do you know if it could be possible?

Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Hi Iñigo,

Where did you put the XPath expression in Form Builder? Did you use the
"Initial Value" or "Calculated Value"? If you want the value to be set only
when opening the `/new` page, then you should use the "Initial Value". If
this is what you're doing, when you're then coming back to the form through
an `/edit` page, the value shouldn't be set again. Is this inline with what
you're seeing, or am misunderstanding your situation?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Hi Alessandro,

Yes, that has to do with what I'm doing but the problem is not there. I have
the XPath expression in "initial value" and it shows the value of the
parameter passed by URL correctly.

The problem is that the form is inside a proxy-portlet and I do not know how
to return to the form's edit within the proxy-portlet, by passing the
document_id by parameter.
Is there any way to get the document_id of the form and redirect the page to
the edit page within the proxy-portlet that is in Liferay?

Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Got it Iñigo, then I'll let Erik follow-up on this one, as he knows the proxy
portlet better than I do, and should be able to help you open your data
there so the "Initial Value" expressions are not re-evaluated.

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Thanks Alessandro,

Hope Erik can help me.

Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Erik Bruchez
Administrator
Iñigo,

I am not sure I have a good answer to the question. Let me see if I
understand well:

1. You show a form in the proxy portlet.
2. The user enters data in that form.
3. Then you have a link in that form which navigates to another "page".
    - The purpose of that is to do a digital signature.
    - Question: Is that page loaded from Liferay? How does it work?
4. Then you want to go back to the data captured by the form in point 2
above.

There is currently no mechanism whereby you can get back to the data except
if you save that data to the database, or if you somehow stored that data
somewhere else and then POST to the form to start over.

Are you currently trying to save the data to the database in point 2 before
going to point 3?

-Erik

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Erik,

Yes, you understand well. The external page where the digital signature is
loaded from Liferay and then returns to the form filled in previously.

Right now I am creating a button with a process in which I save the data in
BD and then navigate to the URL of the digital signature page. But I can not
find the way to send the form data when clicking on the button.
Is there any way to send the form information, and then when you return from
the digital signature, load the form data filled in point 2 according to the
app-name, form-name and document-id?

Iñigo



--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Following this thread, I have seen that a possible solution would be to leave
the data (app-name, form-name, document-id) in session and retrieve them in
the Liferay proxy-portlet, but I do not know if this is possible.

Do you know if it would be possible or how could it be done?

Thank you very much,
Iñigo

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Erik Bruchez
Administrator
You might be able to do this by telling the proxy portlet to load the form
via URL parameters, see:

   
https://doc.orbeon.com/form-runner/link-embed/liferay-proxy-portlet#enabling-form-selection-via-url-parameters

Could this work for you?

The whole process is a bit clunky in the sense that you do have, somehow, to
tell the form, in addition, that signature has succeeded. Using a URL
parameter is dangerous because that could be hacked.

-Erik

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
I have already tried to pass parameters by URL, but the client does not want
the data to be passed by parameter. That's why we've been looking at how to
send the form data by session attributes.

But the thing is that I can not find the way to pass the form data by
session parameters through the link that leads to the digital signature
page.

Hope you can help me.

Iñigo

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Hi again,

I´ve modified the process of the button clear with the properties-local.xml
file so that it calls a web service created by me transmiting the form data:

<property as="xs:string" name="oxf.fr.detail.process.clear.*.*" value='
        save then send(uri =
"http://localhost:8181/o/service/services/clear", method="POST",
content="metadata",replace="all")'
    />

The thing is that I would like to send the form data through a link instead
of modifying the processes of the forms runner buttons.

It would be possible through xforms or another way, do the same?



Thank you,
Iñigo.



--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

Alessandro  Vernet
Administrator
Hi Iñigo,

To summarize (and to make sure I understand your situation correctly!):

1. Users enter data in a form, click a button which saves the data in the
database, and loads a signature page, passing a reference to the document
id.
2. On that page, users sign the data, and on confirmation are sent back to
Orbeon Forms where the form is loaded, passing the document id to load using
the technique Erik mentioned earlier.

When users sign, I imagine that you store some information about that
signature. You could also assign a "signature id" to that signature, which
you pass to the form on step 2. On load you could call a service you
implement, checking that this signature id is indeed valid, and that the
data has been signed. In a situation like this, passing the signature id
doesn't expose any information. Would this work for you?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upload data from an external page in the Orbeon form

inigo10rodri
Hello Alessandro

You are right, but I have already resolved what you are talking about. I
pass the parameters by session, so users can not see the information that is
sent.

The thing is that I would like to send the form data through a link instead
of modifying the button processes of the forms broker.

Would it be possible through xforms or otherwise send the form data to a web
service using a link?

Thank you,
Iñigo

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
12