Hi,
I'm using OPS 3.0.1. I'm doing a very simple test with a standalone xform showing 2 calendar controls. When I click one of the calendar buttons I get the following error in my Firefox javascript console: "showCalendar is not defined" these are my test file: calendartest.xsl <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="main-model"> <xforms:instance id="calendartest"> <test> <startdate></startdate> <enddate></enddate> </test> </xforms:instance> <xforms:bind nodeset="startdate" type="xs:date"/> <xforms:bind nodeset="enddate" type="xs:date"/> </xforms:model> calendartest.xml <html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ui="http:/www.example.org/ui"> <head> <title>calendartest</title> </head> <body> <xforms:group> <xforms:input ref="startdate"/> <xforms:input ref="enddate"/> </xforms:group> </body> </html> page-flow.xml <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:xu="http://www.xmldb.org/xupdate"> <page path-info="/esubsidie/calendartest" view="calendartest.xsl" xforms="calendartest.xml"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> Any ideas? Best Regards, Tom ----------------------------------------- Tom Ferdinande ENCIMA bvba J2EE Solutions - Web Applications Beckhofstraat 92a 8820 Torhout - Belgium Tel : +32(0)50/674 972 Mob : +32(0)476/95 24 19 Mail: mailto:[hidden email] WWW : http://www.encima.be ---------------------------------------- -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Tom,
Are you using NG or Classic, I think you should use it like the below, the page/@xforms is for use with the classic engine for specifying the instance data. If you are new to OPS it is best to learn the NG engine as this is much more powerful and provides more features. calendartest.xsl <html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ui="http:/www.example.org/ui"> <head> <title>calendartest</title> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="main-model"> <xforms:instance id="calendartest"> <test> <startdate></startdate> <enddate></enddate> </test> </xforms:instance> <xforms:bind nodeset="startdate" type="xs:date"/> <xforms:bind nodeset="enddate" type="xs:date"/> </xforms:model> </head> <body> <xforms:group> <xforms:input ref="startdate"/> <xforms:input ref="enddate"/> </xforms:group> </body> </html> page-flow.xml <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:xu="http://www.xmldb.org/xupdate"> <page path-info="/esubsidie/calendartest" view="calendartest.xsl"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Tom Ferdinande
Tom,
The first thing I would like to ask is whether you really intend to use XForms Classic? http://www.orbeon.com/ops/doc/home-faq#xforms-classic-ng http://www.orbeon.com/ops/doc/home-faq#xforms-classic-or-ng I can almost bet that you won't have this issue with NG ;-) -Erik Tom Ferdinande wrote: > Hi, > > I'm using OPS 3.0.1. I'm doing a very simple test with a standalone xform > showing 2 calendar controls. When I click one of the calendar buttons I get > the following error in my Firefox javascript console: "showCalendar is not > defined" > > these are my test file: > > calendartest.xsl > > <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xs="http://www.w3.org/2001/XMLSchema" id="main-model"> > <xforms:instance id="calendartest"> > <test> > <startdate></startdate> > <enddate></enddate> > </test> > </xforms:instance> > <xforms:bind nodeset="startdate" type="xs:date"/> > <xforms:bind nodeset="enddate" type="xs:date"/> > </xforms:model> > > calendartest.xml > > <html xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:ui="http:/www.example.org/ui"> > > <head> > <title>calendartest</title> > </head> > <body> > <xforms:group> > <xforms:input ref="startdate"/> > <xforms:input ref="enddate"/> > </xforms:group> > </body> > </html> > > page-flow.xml > > <config xmlns="http://www.orbeon.com/oxf/controller" > xmlns:xu="http://www.xmldb.org/xupdate"> > <page path-info="/esubsidie/calendartest" view="calendartest.xsl" > xforms="calendartest.xml"/> > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > Any ideas? > > Best Regards, > > Tom > > ----------------------------------------- > Tom Ferdinande > ENCIMA bvba > J2EE Solutions - Web Applications > Beckhofstraat 92a > 8820 Torhout - Belgium > Tel : +32(0)50/674 972 > Mob : +32(0)476/95 24 19 > Mail: mailto:[hidden email] > WWW : http://www.encima.be > ---------------------------------------- > > > > > > > ------------------------------------------------------------------------ > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Ryan Puddephatt
Thanks a lot guys,
I did not realize I was using the classic xforms. I'm back on track... A related question: I want to reuse the same view for different model files (for 2 different forms). With the classic mode I could add 2 entries to my page-path: <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:xu="http://www.xmldb.org/xupdate"> <page path-info="/esubsidie/calendartest1" view="calendartest.xsl" xforms="calendartest1.xml"/> <page path-info="/esubsidie/calendartest2" view="calendartest.xsl" xforms="calendartest2.xml"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> Is there a way to do this with NG? Met vriendelijke groeten, Tom ----------------------------------------- Tom Ferdinande ENCIMA bvba J2EE Solutions - Web Applications Beckhofstraat 92a 8820 Torhout - Belgium Tel : +32(0)50/674 972 Mob : +32(0)476/95 24 19 Mail: mailto:[hidden email] WWW : http://www.encima.be ---------------------------------------- -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Tom,
What exactly changes between your two XForms models? Only XForms instances, or other constraints in the model as well? -Erik Tom Ferdinande wrote: > Thanks a lot guys, > > I did not realize I was using the classic xforms. I'm back on track... > A related question: I want to reuse the same view for different model files > (for 2 different forms). > With the classic mode I could add 2 entries to my page-path: > > <config xmlns="http://www.orbeon.com/oxf/controller" > xmlns:xu="http://www.xmldb.org/xupdate"> > <page path-info="/esubsidie/calendartest1" view="calendartest.xsl" > xforms="calendartest1.xml"/> > <page path-info="/esubsidie/calendartest2" view="calendartest.xsl" > xforms="calendartest2.xml"/> > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > Is there a way to do this with NG? > > Met vriendelijke groeten, > > Tom > > ----------------------------------------- > Tom Ferdinande > ENCIMA bvba > J2EE Solutions - Web Applications > Beckhofstraat 92a > 8820 Torhout - Belgium > Tel : +32(0)50/674 972 > Mob : +32(0)476/95 24 19 > Mail: mailto:[hidden email] > WWW : http://www.encima.be > ---------------------------------------- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
I have a model containing a number of questions. The user can answer yes/no to each of these questions. I use in a xforms:repeat to display the label and to add a select1 option (yes/no). The user can only continue to the next form if he answers 'yes' to all questions. I want to be able to make new questionnaires simply by creating a new model file with different questions and adding a extra line to my page-flow file. Thanks, Tom Excerpt from my view formelevragen.xsl: <xforms:repeat nodeset="instance('formele-vragen')/vraag"> <tr> <td> <xforms:output ref="label"/> </td> </tr> <tr> <td> <xforms:select1 ref="antwoord" appearance="full"> <xforms:item> <xforms:label>Ja </xforms:label> <xforms:value>ja</xforms:value> </xforms:item> <xforms:item> <xforms:label>Nee ! U voldoet niet aan de subsidievoorwaarden !</xforms:label> <xforms:value>nee</xforms:value> </xforms:item> </xforms:select1> </td> </tr> </xforms:repeat> This is my actual model: <formelevragen> <!--<yes/noquestions>--> <titel>Formele vragen subsidie wonen, welzijn, zorg</titel> <vraag> <label>Speelt het project zich af in limburg ?</label> <datum></datum> <antwoord></antwoord> </vraag> <vraag> <label>Bent u rechtspersoon (BV, stichting, vereniging, etc) ? (Inschrijvingsnummer Kamer van Koophandel is verplicht)</label> <antwoord></antwoord> </vraag> <vraag> <label>Bent u een commerciele instelling?</label> <antwoord></antwoord> </vraag> <vraag> <label>Is er sprake van cofinanciering?</label> <antwoord></antwoord> </vraag> <vraag> <label>Wanneer start het project of vindt het project plaats?</label> <antwoord></antwoord> </vraag> <vraag> <label>Sluit het project aan bij de beleidsspeerpunten ? (Voor sociale onwikkeling art. 14 en voor sport art. 16)</label> <antwoord></antwoord> </vraag> <!--</janeevragen>--> <startdatum></startdatum> <einddatum></einddatum> <control> <dirty>false</dirty> <save-trigger/> </control> </formelevragen> -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Tom,
I understand. In that case, you must somehow pass the description of the form from your page model to your page view. One way of doing this is to have your page model produce an entire XForms model, and then XInclude it in your page view, with: <xi:include href="input:data"/> The simplest way is to consider that your page model is your XForms model, so you would write something like: <page path-info="..." model="model1.xml" view="myview.xhtml"/> <page path-info="..." model="model2.xml" view="myview.xhtml"/> etc. Another way would be to pass the name of the form description to the page view, and the have the view load that desscription upon XForms engine initializationm, by reacting to xforms-ready and performing a submission. But the first method above should work. -Erik Tom Ferdinande wrote: > Erik, > > I have a model containing a number of questions. The user can answer yes/no > to each of these questions. > I use in a xforms:repeat to display the label and to add a select1 option > (yes/no). The user can only continue to the next form if he answers 'yes' to > all questions. > > I want to be able to make new questionnaires simply by creating a new model > file with different questions and adding a extra line to my page-flow file. > > Thanks, > > Tom > > Excerpt from my view formelevragen.xsl: > > <xforms:repeat nodeset="instance('formele-vragen')/vraag"> > <tr> > <td> > <xforms:output ref="label"/> > </td> > </tr> > <tr> > <td> > <xforms:select1 ref="antwoord" appearance="full"> > <xforms:item> > <xforms:label>Ja </xforms:label> > <xforms:value>ja</xforms:value> > </xforms:item> > <xforms:item> > <xforms:label>Nee ! U voldoet niet aan > de subsidievoorwaarden !</xforms:label> > <xforms:value>nee</xforms:value> > </xforms:item> > </xforms:select1> > </td> > </tr> > </xforms:repeat> > > This is my actual model: > > <formelevragen> > <!--<yes/noquestions>--> > <titel>Formele vragen subsidie wonen, welzijn, zorg</titel> > <vraag> > <label>Speelt het project zich af in limburg ?</label> > <datum></datum> > <antwoord></antwoord> > </vraag> > <vraag> > <label>Bent u rechtspersoon (BV, stichting, vereniging, > etc) ? (Inschrijvingsnummer Kamer van Koophandel is verplicht)</label> > <antwoord></antwoord> > </vraag> > <vraag> > <label>Bent u een commerciele instelling?</label> > <antwoord></antwoord> > </vraag> > <vraag> > <label>Is er sprake van cofinanciering?</label> > <antwoord></antwoord> > </vraag> > <vraag> > <label>Wanneer start het project of vindt het project > plaats?</label> > <antwoord></antwoord> > </vraag> > <vraag> > <label>Sluit het project aan bij de beleidsspeerpunten ? > (Voor sociale onwikkeling art. 14 en voor sport art. > 16)</label> > <antwoord></antwoord> > </vraag> > <!--</janeevragen>--> > <startdatum></startdatum> > <einddatum></einddatum> > > <control> > <dirty>false</dirty> > <save-trigger/> > </control> > </formelevragen> -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |