Dynamic submission urls

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

Dynamic submission urls

Jimmy
I'm trying to load additional related data to my model after loading the initial data of my main instance.
The references to the additional data is included in the initial instance data.

Using the ev:event="xforms-model-construct-done" I would like to make the additional submissions when the initial data is available. Currently, the event is triggered and the additional submissions are performed with fixed urls. However, I am unable to extract the url references from the initial instance data achieving the sought dynamic behaviour.

How can I make the later submissions use the urls found in the initial instance data?

Cheers!

//Jimmy
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic submission urls

Jimmy
I found the solution and its called Attribute Value Templates (AVTs): A notation supported in Orbeon Forms
which makes it possible to use XPath in attributes. Simply put your Xpath within curly brackets as such:

<xforms:submission id="list-submission" serialization="none" method="get"
				resource="{instance('main-instance')/data/some-element/@id}"
				replace="instance" instance="additional-instance">

In my case, the resource url I wish to extract is found in the id attribute of the element "some-element" in my main instance.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Dynamic submission urls

Erik Bruchez
Administrator
Yup exactly, thanks for sharing that!

-Erik

On Thu, Jan 12, 2012 at 9:07 AM, Jimmy <[hidden email]> wrote:

> I found the solution and its called Attribute Value Templates (AVTs): A
> notation supported in Orbeon Forms
> which makes it possible to use XPath in attributes. Simply put your Xpath
> within curly brackets as such:
>
>
>
> In my case, the resource url I wish to extract is found in the id attribute
> of the element "some-element" in my main instance.
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Dynamic-submission-urls-tp4253508p4289671.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
>


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