Thank you very much Erik,
I now have a good understanding of haw this could be done. I have 2 more questions though : 1. I want to have some kind of "search engine" in my web forms showing in a popup, to help people fill out some fields (like a city search engine for example) and this search engine has to be implemented in java doing SQL searches in a database with filters according to the current user. How would you add such a feature in an Orbeon XForms form ? 2. I want to have some questions showed in my web forms only according to an attribute in the user profile (for exemple, if "isAdmin==true"). How you implement this kind of customization ? Could you point me to where I could find documentation and if possible examples of suche use cases. Thanks a lot again ! Regards Gilles ----- Message d'origine ---- De : Erik Bruchez <[hidden email]> À : [hidden email] Envoyé le : Vendredi, 26 Octobre 2007, 1h03mn 08s Objet : Re: [ops-users] Integrating Orbeon Forms with java local services in Spring Gilles Schlienger wrote: > Hi, > > I love the way Orbeon Forms handles web forms and I can see how it > could benefit in my project at the MVC level (model view controler). > But I need to use business services developped in java, storing data > in a relationnal database (MySQL), so I can create dashboards with > data gathered from complex SQL queries. > > My ideal scenario would be to have in my war: > - a package managing my web forms using Orbeon Forms > - an API to call my Spring local services (no web services, just > - POJO managed by Spring) so I could get the user information, and > - other things... > > And in my web application, a way to have JSP pages managed by Spring > MVC and web forms managed by Orbeon Forms. > > Is this feasible and if yes, where should I look ? Definitely feasible. Your XForms page can talk to XML pipelines indirectly using submissions, or directly using the xxforms:call-xpl() XPath function. A pipeline can call Java using the Java processor, the delegation processor, or a custom processor. Java Processor http://www.orbeon.com/ops/doc/processors-java Delegation Processor http://www.orbeon.com/ops/doc/processors-delegation Processor API http://www.orbeon.com/ops/doc/reference-processor-api You can even call Java from XPath expressions in XForms actions if you really want to do that. Also be sure to have a look at this: Using the Orbeon Forms XForms Engine with Java Applications http://www.orbeon.com/ops/doc/reference-xforms-java -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -----La pièce jointe correspondante suit----- -- 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 _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail -- 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 |
Hi, If your search code must absolutely be in Java, then the Java Processor or a custom processor is the only way I am aware of. These are discussed here If you are able to use SQL directly, the SQL processor provides an interface to jdbc. As to accessing user profiles and customizing forms based on that, it is involved. Essentially, though, the xform must locate data when it initializes or the data is given to it as an instance. There are LDAP , SQL and other processors/generators to get that data. You also can create session variables to hold that data. XForms provides the <switch> and <case> elements to make sections visible or hidden, and the relevant and readonly attributes which can affect the visibility and behavior of controls. You will find some of these in the examples: I hope that is a start. --Hank On Oct 26, 2007, at 5:23 AM, Gilles Schlienger wrote:
Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |
Administrator
|
In reply to this post by Gilles Schlienger
Gilles,
> Thank you very much Erik, > I now have a good understanding of haw this could be done. > > I have 2 more questions though : > > 1. I want to have some kind of "search engine" in my web forms > showing in a popup, to help people fill out some fields (like a city > search engine for example) and this search engine has to be > implemented in java doing SQL searches in a database with filters > according to the current user. > How would you add such a feature in an Orbeon XForms form ? I see that Hank answered a bit about the Java part of things. For the UI part, have a look at the "Google Suggests" example. I think it does something pretty close from what you are looking for. > 2. I want to have some questions showed in my web forms only > according to an attribute in the user profile (for exemple, if > "isAdmin==true"). How you implement this kind of customization ? I see two ways: 1. load the user profile (or parts thereof) as XML into an XForms instance. From there, you can easily determine the visibility of parts of the UI based on the contents of that instance, using either the @relevant property, xforms:switch/xforms:case, or XPath conditions in xforms:group in the UI. 2. Make the decision server-side, and produce a different XForms based on the user profile. You could do this with XSLT. I tend to prefer #1 in most situations. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.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 |
Free forum by Nabble | Edit this page |