Forgive me for the newbie questions, but I cannot seem to find an example of
this. How does one create an xforms app and use multiple model files so that you don't need to have all off the model definition and metadata in one place. If you could point me to an example of multiple model files for an app that would be great. Thanks, Jack -- 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
|
Jack,
In your page view, use XInclude to include the different models, with something like: <xhtml:head> <xi:include href="model1.xml"/> <xi:include href="model2.xml"/> </xhtml:head -Erik Jack Cox wrote: > Forgive me for the newbie questions, but I cannot seem to find an example of > this. > > How does one create an xforms app and use multiple model files so that you > don't need to have all off the model definition and metadata in one place. > > If you could point me to an example of multiple model files for an app that > would be great. > > Thanks, > > Jack > > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Jack Cox
Hui Jack,
I found that one time in which multiple models are required is if you dynamically create itemset lists for select controls. Attached is a page that has multipe models for this very reason. e.g.: <xforms:select ref="stations" appearance="compact"> <xforms:label> Stations: </xforms:label> <xforms:itemset model="stations-model" nodeset="/pfarr/pfarr[@name='Sta_Info']/pfarr"> <xforms:label ref="pfstring[@name='Description']"/> <xforms:value ref="@name"/> </xforms:itemset> </xforms:select> When you use different models, you need to specify them as attributes to xforms elements, including the group element. Orbeon Forms assumes the first model declared in the source if no model attribute is specified. In Orbeon Forms, you can create your xhtml+xforms page using xslt and pipelines -- so in a sense you can dynamically create the list from the server side. I presume you can also use xinclude on the server side to use separate files for different models. I have not tried this. Regards, Hank Hank Ratzesberger http://nees.ucsb.edu/ Institute for Crustal Studies University of California, Santa Barbara 805.893.8042 805.893.8649 (fax) ----- Original Message ----- From: "Jack Cox" <[hidden email]> To: <[hidden email]> Sent: Tuesday, May 08, 2007 1:17 PM Subject: [ops-users] multiple model files > Forgive me for the newbie questions, but I cannot seem to find an example of > this. > > How does one create an xforms app and use multiple model files so that you > don't need to have all off the model definition and metadata in one place. > > If you could point me to an example of multiple model files for an app that > would be great. > > Thanks, > > Jack > > > > > > -- > 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 > -- 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 stats.xhtml (11K) Download Attachment |
In reply to this post by Erik Bruchez
Erik,
Thanks for the quick answer, and my ginormous model.xml file thanks you as well. Jack On 5/8/07 5:41 PM, "Erik Bruchez" <[hidden email]> wrote: > Jack, > > In your page view, use XInclude to include the different models, with > something like: > > <xhtml:head> > <xi:include href="model1.xml"/> > <xi:include href="model2.xml"/> > </xhtml:head > > -Erik > > Jack Cox wrote: >> Forgive me for the newbie questions, but I cannot seem to find an example of >> this. >> >> How does one create an xforms app and use multiple model files so that you >> don't need to have all off the model definition and metadata in one place. >> >> If you could point me to an example of multiple model files for an app that >> would be great. >> >> Thanks, >> >> Jack >> >> >> >> > Jack Cox CapTech Ventures, Inc. 1118 W. Main St. Richmond, VA 23220 804-545-8765 -- 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 |