Hi,
I’m trying to load data from database to a form built with the formbuilder but it doesn’t work. What I did : Install Orbeon on a tomcat instance Add ressource definition in server.xml Add drivers both part (tomcat / Orbeon libs) Then I try to make a form with an input depending on the answer of previous one. I did it like that : DataBase Service Editor : Service Name : testIPP Datasource : oracle SQL Query : SELECT * FROM PATIENT WHERE NOPAT = <sql:param type="xs:string" select=""/> Actions Editor : Action Name : populateForm React to : value change Control : control-1 Service to call : testIPP Source control : control-1 and parameter number 1 Destination control : control-2 with xPath expression : /ressource/row[1]/NOMPAT I saved and published the form then try it but never got the field set. I modified log4j.xml to get debug logs and I saw my request and data from my database so it look like my datasource configuration is OK but when I look at the response from firebug I see : <?xml version="1.0" encoding="utf-8"?><xxf:event-response xmlns:xxf="http://orbeon.org/oxf/xml/xforms"><xxf:dynamic-state>pers:F9F4DC4D-DC17-9273-A27B-E2D2F8819A58</xxf:dynamic-state><xxf:action><xxf:control-values><xxf:control id="control-1-control">fzef</xxf:control></xxf:control-values></xxf:action></xxf:event-response> Is there anything I did misconfigured ? Or did I forget something ? Can anyone help me on this. Thanks. Guillaume |
Administrator
|
Guillaume,
What you are doing seems to be very similar to what I described here: http://n4.nabble.com/Form-populate-with-data-from-sql-td1678998.html#a1679585 Do you see anything different in the way you are doing it? I tried following those steps again, and it worked fine for me. If this doesn't help, I recommend you enable more debugging with the following in your properties-local.xml: <property as="xs:NMTOKENS" name="oxf.xforms.logging.debug" value="document event action submission submission-details submission-body server server-body control html"/> This way you will see the call to the database service and what it returns. Alternatively, you can also enable the XForms Inspector with: <property as="xs:boolean" name="oxf.epilogue.xforms.inspector" value="true"/> Then when testing your form, look under the model fr-form-model, the content of the instance fr-service-response-instance. The XPath expression you have to put in the action to populate a control is a bit tricky, and it is easy to write an expression there that doesn't return what you expect. I hope this helps, Alex On Mon, Apr 12, 2010 at 3:04 AM, Guillaume Huart <[hidden email]> wrote: > > Hi, > > I’m trying to load data from database to a form built with the formbuilder > but it doesn’t work. > What I did : > Install Orbeon on a tomcat instance > Add ressource definition in server.xml > Add drivers both part (tomcat / Orbeon libs) > > Then I try to make a form with an input depending on the answer of previous > one. I did it like that : > DataBase Service Editor : > Service Name : testIPP > Datasource : oracle > SQL Query : SELECT * FROM PATIENT WHERE NOPAT = <sql:param > type="xs:string" select=""/> > > Actions Editor : > Action Name : populateForm > React to : value change > Control : control-1 > Service to call : testIPP > Source control : control-1 and parameter number 1 > Destination control : control-2 with xPath expression : > /ressource/row[1]/NOMPAT > > I saved and published the form then try it but never got the field set. I > modified log4j.xml to get debug logs and I saw my request and data from my > database so it look like my datasource configuration is OK but when I look > at the response from firebug I see : > <?xml version="1.0" encoding="utf-8"?><xxf:event-response > xmlns:xxf="http://orbeon.org/oxf/xml/xforms"><xxf:dynamic-state>pers:F9F4DC4D-DC17-9273-A27B-E2D2F8819A58</xxf:dynamic-state><xxf:action><xxf:control-values><xxf:control > id="control-1-control">fzef</xxf:control></xxf:control-values></xxf:action></xxf:event-response> > > Is there anything I did misconfigured ? Or did I forget something ? > > Can anyone help me on this. > Thanks. > Guillaume > > -- > View this message in context: http://n4.nabble.com/Loading-data-from-datasource-tp1836890p1836890.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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
I am out of the office until 19th April *********************************************************************************************** This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.
Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.
Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards. *********************************************************************************************** The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG
|
In reply to this post by Alessandro Vernet
Hi Alex,
I got it working yesterday with the released version following your description in the post but still not working on the nightly build. I think i made some misconfiguration anywhere that broke it down so i install the nightly build again and it work fine now... Thanks for your answer and sorry for the waste of time, I can now follow my experience with orbeon on this build. Do you have any estimation date of release for new version? I found a post where you gave a link (http://wiki.orbeon.com/forms/doc/developer-guide/release-orbeon-forms-372) but it return not found :( Thx, Guillaume |
Administrator
|
Guillaume,
I am glad it worked! This page moved to: http://wiki.orbeon.com/forms/projects/orbeon-forms-38 Alex On Wed, Apr 14, 2010 at 2:46 AM, Guillaume Huart <[hidden email]> wrote: > > Hi Alex, > > I got it working yesterday with the released version following your > description in the post but still not working on the nightly build. > I think i made some misconfiguration anywhere that broke it down so i > install the nightly build again and it work fine now... > Thanks for your answer and sorry for the waste of time, I can now follow my > experience with orbeon on this build. > Do you have any estimation date of release for new version? I found a post > where you gave a link > (http://wiki.orbeon.com/forms/doc/developer-guide/release-orbeon-forms-372) > but it return not found :( > > Thx, > Guillaume > -- > View this message in context: http://n4.nabble.com/Loading-data-from-datasource-tp1836890p1839540.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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |