assign document_id to new forms in orbeon 4.0

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

assign document_id to new forms in orbeon 4.0

Björn Molin
Hi

In orbeon 3.9 I create new forms with one of the url:s (both works)
/fr/[APPLICATION_NAME]/[FORM_NAME]/new/MY_DOCUMENT_ID
/fr/[APPLICATION_NAME]/[FORM_NAME]/edit/MY_DOCUMENT_ID

It is a very conveniant way to take control of document id generation
outside orbeon.

However, this does not work in 4.0 M16. Can it be related to the new
authorization mechanism?
http://wiki.orbeon.com/forms/doc/developer-guide/release-notes/40#TOC-Submitting-initial-data-to-Form-Runner

I am looking for a way to configure Orbeon 4 to make use of an assigned
document_id i new forms.

Any help would be appreciated
/Björn



--
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
Reply | Threaded
Open this post in threaded view
|

Re: assign document_id to new forms in orbeon 4.0

Erik Bruchez
Administrator
The reason is on this line:

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/includes/persistence/persistence-model.xml#L144

This rejects a GET to /new if an id is not automatically generated.

I think this was done to prevent an external injection of a document id.

I am wondering what would be a reasonably safe solution to do this. I
don't think it's great if any user can modify the page URL to specify
a document id.

From where do you call that URL? Another app, or could you use a
Servlet forward?

-Erik

On Tue, Dec 4, 2012 at 5:25 AM, Björn Molin <[hidden email]> wrote:

> Hi
>
> In orbeon 3.9 I create new forms with one of the url:s (both works)
> /fr/[APPLICATION_NAME]/[FORM_NAME]/new/MY_DOCUMENT_ID
> /fr/[APPLICATION_NAME]/[FORM_NAME]/edit/MY_DOCUMENT_ID
>
> It is a very conveniant way to take control of document id generation
> outside orbeon.
>
> However, this does not work in 4.0 M16. Can it be related to the new
> authorization mechanism?
> http://wiki.orbeon.com/forms/doc/developer-guide/release-notes/40#TOC-Submitting-initial-data-to-Form-Runner
>
> I am looking for a way to configure Orbeon 4 to make use of an assigned
> document_id i new forms.
>
> Any help would be appreciated
> /Björn
>
>
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: assign document_id to new forms in orbeon 4.0

bpmf
This post was updated on .
In reply to this post by Björn Molin
If you have customized the persistence layer, you can create a new form from a template and replace it with your favorite ID in other component, and use "/edit/MY_DOCUMENT_ID" only.