Hi all!
We are completely new to Orbeon and to XForms. We are really amazed about how easy it is to build complex forms using Orbeon Builder. However, we would like to use Orbeon to build forms that we could then integrate in our JEE apps (mainly Struts and Grails apps that use DB2 for the database). The problem is that we don’t really get to see the way to use Orbeon-designed XForms outside a pure XRX (XForms, REST, XQuery) architecture. We could imagine how this could be achieved, but the effort of getting it done makes us not wanting to use Orbeon Forms for our purpose. I’ll try to explain how we “imagine” that Orbeon XForms could integrate with JEE applications. In a pure XRX architecture, Orbeon Builder is used to easily build XForms that are stored in a XML database (normally eXist). Orbeon Runner will then get that stored form and make it run on your browser. Data entered via that form is stored in another (not sure if it’s another one) XML database. Our needs regarding Orbeon XForms-JEE integration are, basically, that data entered via XForms be stored in a “regular” relational database (mainly DB2) and that XForms be embedded into our Struts jsp or Grails gsp pages at runtime. The ideal scenario would let you embed an Orbeon form into your jsp page via custom Orbeon tags (taglibs). All the XForms would be stored in a repository (ok, that could be an eXist database, no problem) and those custom tags would let you identify the form you want the runner to pull out from the repository, embed it into your jsp page and start running. To get the data entered via that form reach your “regular” relational DB2 database, the form would call, via a submit button, a Struts Action class that would receive all the values entered in the form via request parameters. Now, is there anything like that already done? Has anyone tried to integrate Orbeon XForms into a “regular” JEE app? Does it make any sense? Everyone using Orbeon XForms is working in a 100% XML environment or architecture like XRX? Are we getting nuts? Thanks in advance for all your comments and advices. Best regards, Potele -- You receive this message as a subscriber of the ops-users@ow2.org mailing list. To unsubscribe: mailto:ops-users-unsubscribe@ow2.org For general help: mailto:sympa@ow2.org?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Potele,
There are a couple of separate questions in your email: 1. persistence of forms and data 2. integration of form within existing pages #1 is fairly clear: you can create your own persistence layer as a REST service. It's "just" a matter of implementing your own persistence layer: http://wiki.orbeon.com/forms/doc/contributor-guide/form-builder-integration-notes You are not going to work around the fact that Form Builder/Form Runner use XML and talk to that persistence layer through a REST API. So it's going to be your job to do a service and an XML <-> relational mapping (and if you do a good one it would be great to integrate it in Orbeon Forms ;). As for #2, this kind of embedding is possible. We have even built such embedding for a PHP CMS, TYPO3: http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/typo3-extension The PHP code basically works as a proxy for Orbeon Forms. In Java you could do something similar, although we don't have this out of the box, although we an "Ajax portlet" mode that might still work (in fairness it hasn't been updated in a while). Embedding typically works as follows: * you need to call a URL which loads the HTML produced by Form Runner (Orbeon Forms can produce just an HTML fragment if needed) * you embed that HTML in your page * you make sure all Orbeon resources point to the right place * you make sure all Orbeon Ajax server points to the right place * you might proxy HTML POST as well (for uploads and Form Runner navigation) I hope this helps, -Erik On Mon, Sep 20, 2010 at 2:57 AM, potele <[hidden email]> wrote: > Hi all! > > We are completely new to Orbeon and to XForms. We are really amazed about how > easy it is to build complex forms using Orbeon Builder. However, we would like > to use Orbeon to build forms that we could then integrate in our JEE apps > (mainly Struts and Grails apps that use DB2 for the database). > > The problem is that we don’t really get to see the way to use Orbeon-designed > XForms outside a pure XRX (XForms, REST, XQuery) architecture. We could imagine > how this could be achieved, but the effort of getting it done makes us not > wanting to use Orbeon Forms for our purpose. > > I’ll try to explain how we “imagine” that Orbeon XForms could integrate > with JEE applications. > > In a pure XRX architecture, Orbeon Builder is used to easily build XForms that > are stored in a XML database (normally eXist). Orbeon Runner will then get that > stored form and make it run on your browser. Data entered via that form is > stored in another (not sure if it’s another one) XML database. > > Our needs regarding Orbeon XForms-JEE integration are, basically, that data > entered via XForms be stored in a “regular” relational database (mainly > DB2) and that XForms be embedded into our Struts jsp or Grails gsp pages at > runtime. > > The ideal scenario would let you embed an Orbeon form into your jsp page via > custom Orbeon tags (taglibs). All the XForms would be stored in a repository > (ok, that could be an eXist database, no problem) and those labels would let > you identify the form you want the runner to pull out from the repository, > embed it into your jsp page and start running. > > To get the data entered via that form reach your “regular” relational DB2 > database, the form would call, via a submit button, a Struts Action class that > would receive all the values entered in the form via request parameters. > > Now, is there anything like that already done? Has anyone tried to integrate > Orbeon XForms into a “regular” JEE app? Does it make any sense? Everyone > using Orbeon XForms is working in a 100% XML environment or architecture like > XRX? Are we getting nuts? > > Thanks in advance for all your comments and advices. > > Best regards, > Potele > > > -- > 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 |
Erik,
Thank you very much for your answer. It helped me realize that there's not a straight forward way to integrate Orbeon XForms into our existing apps. That's something. Best regards, Potele |
In reply to this post by Erik Bruchez
Erik,
Can you comment further on how "you might proxy HTML POST as well (for uploads and Form Runner navigation)"? I'm able to proxy the GET request for a Form Runner form, but when I click on the workflow-send button I get an error that the session has expired. I'm assuming that I need to proxy the POST and pass along cookie information to link the GET and POST requests into a session. Does that seem right? If so, any suggestions about how to do it? Thanks, Brian |
Administrator
|
Brian,
I think the best is to look at how the PHP code is written. I think it handles cookies as well. -Erik On Wed, Oct 20, 2010 at 1:28 PM, bsantucci <[hidden email]> wrote: > > Erik, > > Can you comment further on how "you might proxy HTML POST as well (for > uploads and Form Runner navigation)"? > > I'm able to proxy the GET request for a Form Runner form, but when I click > on the workflow-send button I get an error that the session has expired. > I'm assuming that I need to proxy the POST and pass along cookie information > to link the GET and POST requests into a session. Does that seem right? If > so, any suggestions about how to do it? > > Thanks, > Brian > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Integrate-Orbeon-XForms-with-JEE-apps-tp2546738p3004532.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 |
I integrated Orbeon Forms with Jackrabbit JCR. It is pretty straightforward using the Orbeon Forms Filter. Any request to "edit" a document retrieves the XML and this is then processed by by the Orbeon filter. This means you can separate Orbeon from your Webapp, which is nice.
The JSP/Velocity which displays your XForm simple needs to fill in the submit URL which takes the XML and saves it to the repository (database, jackrabbit etc). I've not looked much at the forms builder integration so don't know if this helps your use case. |
Free forum by Nabble | Edit this page |