Hi I’m using Orbeon form runner My model looks something like <xf:model xml:base="http://localhost:8014"> <xf:instance> <institution:institution> Content here </institution:institution> </xf:instance> Various xf:bind elements <xf:submission id="save" method="put" resource="/institutions/abcdef.html" ref="/institution:institution" replace="all"/> </xf:model> In my form I have <body xml:base="http://localhost:8014"> <xf:group ref="/institution:institution"> Form stuff <xf:submit submission="save"> <xf:label>Save</xf:label> </xf:submit> </fieldset> </xf:group> </body> But what I find when I hit save is that a POST is made to the endpoint the content was retrieved from ( /institutions/abcdef/edit.html, let’s say ) So my submission element is being ignored. What am I doing wrong? I was advised I might need the xml:base references as I’m PUTting back to a resource other than the one /institutions/abcdef/edit.html was retrieved fro. I’ve tried various permutations of things but to no avail. Thanks Ken Tune 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]. |
Administrator
|
Ken,
Your example doesn't appear to be using Form Runner. Rather it seems to be using plain XForms. You can try a few things. For example, instead of using just a path, `/institutions/abcdef.html`, try using an absolute URL to see if that makes a difference. But I suspect that there is something else awry, or you wouldn't see a POST instead of a PUT I would make sure that you have a proper log file in place, so that you can get more information if errors happen: https://github.com/orbeon/orbeon-forms/wiki/Installation-~-Basic#logging-configuration You mention "the endpoint the content was retrieved from", which tells me there is a bigger picture, so it's hard to tell without seeing your entire form and even being able to run it. Can you provide more details? -Erik |
In reply to this post by Ken Tune
Erik
Thanks for your response This may help a little .... I've discovered that if I use replace="none" in the submission element rather than replace="all" then the correct method (PUT) / resource is used, and the data is persisted as required <xf:submission id="save" method="put" resource="/institutions/abcdef.html" ref="/institution:institution" replace="all"/> Does that provide more insight? I'd like to use 'replace="all"' but I could work round it. It appears that using replace="all" results in the submission element being ignored however - does that sound plausible? I have got logging enabled but although there is a lot of content, the logs don't show any errors when replace="all" is enabled. Thanks Ken |
Possibly I'm up against
https://github.com/orbeon/orbeon-forms/issues/2326 in that I'm using this in embedded mode. |
Administrator
|
Ah yes, that would make sense. Sorry, but it's a limitation of embedding right now.
-Erik |
Thanks for the response Erik. I’ll work round it. Ken From: Erik Bruchez [via Orbeon Forms community mailing list] [mailto:ml-node+[hidden email]]
Ah yes, that would make sense. Sorry, but it's a limitation of embedding right now.
If you reply to this email, your message will be added to the discussion below: http://discuss.orbeon.com/Submission-element-ignored-tp4660472p4660525.html
To unsubscribe from Submission element ignored,
click here. |
Free forum by Nabble | Edit this page |