orbean forms bulder + custom persistance api: Why does it call /crud/.../data/data.xml?

Posted by yankee on Stack Overflow See other posts from Stack Overflow or by yankee
Published on 2012-06-04T15:51:48Z Indexed on 2012/06/05 16:40 UTC
Read the original article Hit count: 217

Filed under:

I am currently implementing my own persistence layer for orbeon forms. As far as I have understood the virtual hierachy of data, creating a form with form builder in the application "myapp" with the name "myform" should cause the form builder to call

/crud/myapp/myform/form/form.xhtml, passing the newly created form as HTTP-PUT data. Thus I created a spring method annotated with:

@RequestMapping(method = RequestMethod.PUT, value = "/crud/{applicationName}/{formName}/form/form.xhtml")
public void saveForm(@PathVariable String formName, @RequestBody String putData)

I expected this method to be called with my form. But this method does not get called. Instead the method

@RequestMapping(method = RequestMethod.PUT, value = "/crud/{applicationName}/{formName}/data/{uuid}/data.xml")
public void saveInstance(@PathVariable String uuid, @RequestBody String putData)

gets called. Put data contains the full xhtml form. Why is this happening? I thought that the second URL would only be called for saving an instance, more specifically the <xforms:instance id="fr-form-instance"> part of a form, once I fill in values for a form.

© Stack Overflow or respective owner

Related posts about orbeon