问题
From the Orbeon XForms tutorial tutorial, I understand that Orbeon saves data in eXist-db (built into Orbeon). The sample application saves the data of a book in xml format in eXist-db. According to the tutorial, to view the data in browser, I first have to disable the orbeon-exist-filter
in web.xml
, and can then open http://<host_name>/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml
.
I also understand that when I have made a form using Orbeon Form Builder (without any code using only mouse drag and drop) the form is also saved in eXist-db. I am wondering:
- How can I see the form (source code of the form) saved in eXist-db? I think there is an URI/URL (like the example tutorial) for accessing this. If So, what is the URI/URL and in orbeon where the URI/URL has been saved?
- How can I view the data entered into the forms?
- Is it possible to have Orbeon point to an external instance of eXist-db rather than the built-in one?
Thanks in advance.
回答1:
As a general thing, it really helps if you use a tool to monitor HTTP requests when working with eXist and Orbeon. See Monitoring HTTP Requests. I personally use both HttpScoop and Charles on OS X. With such tools you will see exactly how Orbeon Forms reads and writes from the persistence layer and eXist.
For a published form definition:
http://{$host}/orbeon/fr/service/persistence/crud/{$app}/{$form}/form/form.xhtml
For a form definition just saved (but not published) by Form Builder:
http://{$host}/orbeon/fr/service/exist/crud/orbeon/builder/data/{$document}/data.xml
You mean without using the Form Runner Summary page? Something like:
http://{$host}/orbeon/fr/service/exist/crud/{$app}/{$form}/data/{$document}/data.xml
Yes. See Configuring a Form Runner eXist database.
To access the persistence API from the browser, you will also want:
<property as="xs:string"
processor-name="oxf:page-flow"
name="service-public-methods"
value="#all"/>
But don't leave that in production!
来源:https://stackoverflow.com/questions/23387090/how-to-view-the-source-of-an-orbeon-form-saved-in-exist-db