Hi! I tried to operate with a form having more than one model but it doesn’t work at all. We want to have a modular ‚library‘ of models and appropriate forms which we can plug-in to make the needed operations available in several XForms forms. Whenever I try to send a submission not included in the first model in the XForms definitions in the view.xhtml it doesn’t happen anything. The submission request is just ignored. Not even the xforms-submit-error is executed.
If i insert the additional model into the first model there is no reaction at all and it isn’t even displayed (includes do work, there are several other ones in the form and the xi:include namespace is defined). The other model isn’t even recogniozed (model is not shown in the widget and the instances are not available).
If I insert it before the other models the main form is broken and I get a lot of errors about not recognized variables (which means to me, the second model isn’t read properly). And that’s exactly the same when inserted after the main model. If inserted after the first model, the second is shown, but you can’t interact with it. I thought Orbeon can handle multiple models?
I’ve got the following ‚additional‘ model: <?xml version="1.0" encoding="UTF-8"?> ...
There is a submission inside this model and the two instances.
I tried the following includes:
... <xforms:model id=“main“> ... <xi:include href=“additional_model.xhtml“ /> </xforms:model> ... Does not recognize any instances within the additional model.
... <xi:include href=“additional_model.xhtml“ /> <xforms:model id=“main“> ... </xforms:model> ... Causes failures in actions related to the main model (because they are not addressed to a specific model, i.e. they use the first model).
... <xforms:model id=“main“> ... </xforms:model> <xi:include href=“additional_model.xhtml“ /> ... Model is available tot he widget but instances can not be addressed within xforms:listitem, xforms:submit etc. neither by calling xxforms:instance nor by instance. How can I get information from the additional model? Any suggestions else to setup a modular model system? Who uses multiple models in a XForm, who uses xi:includes to have a kind of plug-in architecture? What are your experiences? Regards and thx a lot in advance, Thorsten -- 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
|
Thorsten,
I am not sure why it's not working for you, but multiple models are fully supported in Orbeon Forms. We use this heavily in particular in Form Runner, where we do include such a "library" of external models with XInclude. Best would be if you could create a small example where multiple models don't work. There is probably a simple explanation. -Erik On Fri, Feb 5, 2010 at 5:07 AM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Hi! > > I tried to operate with a form having more than one model but it doesn’t > work at all. > > We want to have a modular ‚library‘ of models and appropriate forms which we > can plug-in to make the needed operations available in several XForms forms. > > Whenever I try to send a submission not included in the first model in the > XForms definitions in the view.xhtml it doesn’t happen anything. > > The submission request is just ignored. Not even the xforms-submit-error is > executed. > > If i insert the additional model into the first model there is no reaction > at all and it isn’t even displayed (includes do work, there are several > other ones in the form and the xi:include namespace is defined). The other > model isn’t even recogniozed (model is not shown in the widget and the > instances are not available). > > If I insert it before the other models the main form is broken and I get a > lot of errors about not recognized variables (which means to me, the second > model isn’t read properly). > > And that’s exactly the same when inserted after the main model. > > If inserted after the first model, the second is shown, but you can’t > interact with it. > > I thought Orbeon can handle multiple models? > > I’ve got the following ‚additional‘ model: > > <?xml version="1.0" encoding="UTF-8"?> > <xforms:model id="additional" xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:widget="http://orbeon.org/oxf/xml/widget" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <xforms:instance id="instA"> > <foo xmlns="" /> > </xforms:instance> > > <xforms:instance id=" instB"> > <bar xmlns="" /> > </xforms:instance> > > ... > > </xforms:model> > > There is a submission inside this model and the two instances. > > I tried the following includes: > > ... > > <xforms:model id=“main“> > > ... > > <xi:include href=“additional_model.xhtml“ /> > > </xforms:model> > > ... > > Does not recognize any instances within the additional model. > > ... > > <xi:include href=“additional_model.xhtml“ /> > > <xforms:model id=“main“> > > ... > > </xforms:model> > > ... > > Causes failures in actions related to the main model (because they are not > addressed to a specific model, i.e. they use the first model). > > > > ... > > <xforms:model id=“main“> > > ... > > </xforms:model> > > <xi:include href=“additional_model.xhtml“ /> > > ... > > Model is available tot he widget but instances can not be addressed within > xforms:listitem, xforms:submit etc. neither by calling xxforms:instance nor > by instance. > > How can I get information from the additional model? > > Any suggestions else to setup a modular model system? > > Who uses multiple models in a XForm, who uses xi:includes to have a kind of > plug-in architecture? What are your experiences? > > Regards and thx a lot in advance, > > Thorsten > > -- > 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 |
Administrator
|
In reply to this post by Thorsten Stumpf
Thorsten,
I am not sure if this is the problem you're having, but note that if you are doing anything in the view that references something from a model other than the first one, you need to switch to that model, with the model attribute. So if you have my-model-a and my-model-b declared in that order, if in the view you want to run a submission my-submission declared in model-b, you need to write <xforms:send model="model-b" submission="my-submission">. Also, switching to another model applies to child elements: if part of your view is related to my-model-b, you can put it inside an <xforms:group model="my-model-b"> so you don't have to repeat that model attribute all over the place. I hope this helps, Alex On Fri, Feb 5, 2010 at 6:07 AM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Hi! > > I tried to operate with a form having more than one model but it doesn’t > work at all. > > We want to have a modular ‚library‘ of models and appropriate forms which we > can plug-in to make the needed operations available in several XForms forms. > > Whenever I try to send a submission not included in the first model in the > XForms definitions in the view.xhtml it doesn’t happen anything. > > The submission request is just ignored. Not even the xforms-submit-error is > executed. > > If i insert the additional model into the first model there is no reaction > at all and it isn’t even displayed (includes do work, there are several > other ones in the form and the xi:include namespace is defined). The other > model isn’t even recogniozed (model is not shown in the widget and the > instances are not available). > > If I insert it before the other models the main form is broken and I get a > lot of errors about not recognized variables (which means to me, the second > model isn’t read properly). > > And that’s exactly the same when inserted after the main model. > > If inserted after the first model, the second is shown, but you can’t > interact with it. > > I thought Orbeon can handle multiple models? > > I’ve got the following ‚additional‘ model: > > <?xml version="1.0" encoding="UTF-8"?> > <xforms:model id="additional" xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:widget="http://orbeon.org/oxf/xml/widget" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <xforms:instance id="instA"> > <foo xmlns="" /> > </xforms:instance> > > <xforms:instance id=" instB"> > <bar xmlns="" /> > </xforms:instance> > > ... > > </xforms:model> > > There is a submission inside this model and the two instances. > > I tried the following includes: > > ... > > <xforms:model id=“main“> > > ... > > <xi:include href=“additional_model.xhtml“ /> > > </xforms:model> > > ... > > Does not recognize any instances within the additional model. > > ... > > <xi:include href=“additional_model.xhtml“ /> > > <xforms:model id=“main“> > > ... > > </xforms:model> > > ... > > Causes failures in actions related to the main model (because they are not > addressed to a specific model, i.e. they use the first model). > > > > ... > > <xforms:model id=“main“> > > ... > > </xforms:model> > > <xi:include href=“additional_model.xhtml“ /> > > ... > > Model is available tot he widget but instances can not be addressed within > xforms:listitem, xforms:submit etc. neither by calling xxforms:instance nor > by instance. > > How can I get information from the additional model? > > Any suggestions else to setup a modular model system? > > Who uses multiple models in a XForm, who uses xi:includes to have a kind of > plug-in architecture? What are your experiences? > > Regards and thx a lot in advance, > > Thorsten > > -- > 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 Orbeon's Blog: http://www.orbeon.com/blog/ 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 |
Hi!
I'm really trying to find a explanation but as of yet I'm not that successfull. Our form is quite complex so maybe we're using something in combination which is causing the problem. The submission seems to be blocked. The log looks quite fine. But when I click on the submit button the result are not ok or it is not send at all. I'm going to digg deeper on that soon. Thx, JT > -----Ursprüngliche Nachricht----- > Von: Alessandro Vernet [mailto:[hidden email]] > Gesendet: Freitag, 5. Februar 2010 20:09 > An: [hidden email] > Betreff: [ops-users] Re: More than one model in a form > > Thorsten, > > I am not sure if this is the problem you're having, but note that if you are doing > anything in the view that references something from a model other than the first > one, you need to switch to that model, with the model attribute. > > So if you have my-model-a and my-model-b declared in that order, if in the view > you want to run a submission my-submission declared in model-b, you need to > write <xforms:send model="model-b" > submission="my-submission">. Also, switching to another model applies to child > elements: if part of your view is related to my-model-b, you can put it inside an > <xforms:group model="my-model-b"> so you don't have to repeat that model > attribute all over the place. > > I hope this helps, > > Alex > > On Fri, Feb 5, 2010 at 6:07 AM, Stumpf, Jens Thorsten > <[hidden email]> wrote: > > Hi! > > > > I tried to operate with a form having more than one model but it > > doesn't work at all. > > > > We want to have a modular 'library' of models and appropriate forms > > which we can plug-in to make the needed operations available in several XForms > forms. > > > > Whenever I try to send a submission not included in the first model in > > the XForms definitions in the view.xhtml it doesn't happen anything. > > > > The submission request is just ignored. Not even the > > xforms-submit-error is executed. > > > > If i insert the additional model into the first model there is no > > reaction at all and it isn't even displayed (includes do work, there > > are several other ones in the form and the xi:include namespace is > > defined). The other model isn't even recogniozed (model is not shown > > in the widget and the instances are not available). > > > > If I insert it before the other models the main form is broken and I > > get a lot of errors about not recognized variables (which means to me, > > the second model isn't read properly). > > > > And that's exactly the same when inserted after the main model. > > > > If inserted after the first model, the second is shown, but you can't > > interact with it. > > > > I thought Orbeon can handle multiple models? > > > > I've got the following 'additional' model: > > > > <?xml version="1.0" encoding="UTF-8"?> <xforms:model id="additional" > > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > xmlns:xforms="http://www.w3.org/2002/xforms" > > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > > xmlns:xi="http://www.w3.org/2001/XInclude" > > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > xmlns:widget="http://orbeon.org/oxf/xml/widget" > > xmlns:ev="http://www.w3.org/2001/xml-events" > > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > > > <xforms:instance id="instA"> > > <foo xmlns="" /> > > </xforms:instance> > > > > <xforms:instance id=" instB"> > > <bar xmlns="" /> > > </xforms:instance> > > > > ... > > > > </xforms:model> > > > > There is a submission inside this model and the two instances. > > > > I tried the following includes: > > > > ... > > > > <xforms:model id="main"> > > > > ... > > > > <xi:include href="additional_model.xhtml" /> > > > > </xforms:model> > > > > ... > > > > Does not recognize any instances within the additional model. > > > > ... > > > > <xi:include href="additional_model.xhtml" /> > > > > <xforms:model id="main"> > > > > ... > > > > </xforms:model> > > > > ... > > > > Causes failures in actions related to the main model (because they are > > not addressed to a specific model, i.e. they use the first model). > > > > > > > > ... > > > > <xforms:model id="main"> > > > > ... > > > > </xforms:model> > > > > <xi:include href="additional_model.xhtml" /> > > > > ... > > > > Model is available tot he widget but instances can not be addressed > > within xforms:listitem, xforms:submit etc. neither by calling > > xxforms:instance nor by instance. > > > > How can I get information from the additional model? > > > > Any suggestions else to setup a modular model system? > > > > Who uses multiple models in a XForm, who uses xi:includes to have a > > kind of plug-in architecture? What are your experiences? > > > > Regards and thx a lot in advance, > > > > Thorsten > > > > -- > > 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 Orbeon's Blog: > http://www.orbeon.com/blog/ 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 |
Administrator
|
Sounds good. With full logging, you should be able to tell if/how/when
the submission is stuck. -Erik On Mon, Feb 15, 2010 at 2:39 AM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Hi! > > I'm really trying to find a explanation but as of yet I'm not that successfull. > Our form is quite complex so maybe we're using something in combination which is causing the problem. > > The submission seems to be blocked. The log looks quite fine. But when I click on the submit button the result are not ok or it is not send at all. > I'm going to digg deeper on that soon. > > Thx, > > JT > > >> -----Ursprüngliche Nachricht----- >> Von: Alessandro Vernet [mailto:[hidden email]] >> Gesendet: Freitag, 5. Februar 2010 20:09 >> An: [hidden email] >> Betreff: [ops-users] Re: More than one model in a form >> >> Thorsten, >> >> I am not sure if this is the problem you're having, but note that if you are doing >> anything in the view that references something from a model other than the first >> one, you need to switch to that model, with the model attribute. >> >> So if you have my-model-a and my-model-b declared in that order, if in the view >> you want to run a submission my-submission declared in model-b, you need to >> write <xforms:send model="model-b" >> submission="my-submission">. Also, switching to another model applies to child >> elements: if part of your view is related to my-model-b, you can put it inside an >> <xforms:group model="my-model-b"> so you don't have to repeat that model >> attribute all over the place. >> >> I hope this helps, >> >> Alex >> >> On Fri, Feb 5, 2010 at 6:07 AM, Stumpf, Jens Thorsten >> <[hidden email]> wrote: >> > Hi! >> > >> > I tried to operate with a form having more than one model but it >> > doesn't work at all. >> > >> > We want to have a modular 'library' of models and appropriate forms >> > which we can plug-in to make the needed operations available in several XForms >> forms. >> > >> > Whenever I try to send a submission not included in the first model in >> > the XForms definitions in the view.xhtml it doesn't happen anything. >> > >> > The submission request is just ignored. Not even the >> > xforms-submit-error is executed. >> > >> > If i insert the additional model into the first model there is no >> > reaction at all and it isn't even displayed (includes do work, there >> > are several other ones in the form and the xi:include namespace is >> > defined). The other model isn't even recogniozed (model is not shown >> > in the widget and the instances are not available). >> > >> > If I insert it before the other models the main form is broken and I >> > get a lot of errors about not recognized variables (which means to me, >> > the second model isn't read properly). >> > >> > And that's exactly the same when inserted after the main model. >> > >> > If inserted after the first model, the second is shown, but you can't >> > interact with it. >> > >> > I thought Orbeon can handle multiple models? >> > >> > I've got the following 'additional' model: >> > >> > <?xml version="1.0" encoding="UTF-8"?> <xforms:model id="additional" >> > xmlns:xhtml="http://www.w3.org/1999/xhtml" >> > xmlns:xforms="http://www.w3.org/2002/xforms" >> > xmlns:f="http://orbeon.org/oxf/xml/formatting" >> > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >> > xmlns:xi="http://www.w3.org/2001/XInclude" >> > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >> > xmlns:xs="http://www.w3.org/2001/XMLSchema" >> > xmlns:widget="http://orbeon.org/oxf/xml/widget" >> > xmlns:ev="http://www.w3.org/2001/xml-events" >> > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >> > >> > <xforms:instance id="instA"> >> > <foo xmlns="" /> >> > </xforms:instance> >> > >> > <xforms:instance id=" instB"> >> > <bar xmlns="" /> >> > </xforms:instance> >> > >> > ... >> > >> > </xforms:model> >> > >> > There is a submission inside this model and the two instances. >> > >> > I tried the following includes: >> > >> > ... >> > >> > <xforms:model id="main"> >> > >> > ... >> > >> > <xi:include href="additional_model.xhtml" /> >> > >> > </xforms:model> >> > >> > ... >> > >> > Does not recognize any instances within the additional model. >> > >> > ... >> > >> > <xi:include href="additional_model.xhtml" /> >> > >> > <xforms:model id="main"> >> > >> > ... >> > >> > </xforms:model> >> > >> > ... >> > >> > Causes failures in actions related to the main model (because they are >> > not addressed to a specific model, i.e. they use the first model). >> > >> > >> > >> > ... >> > >> > <xforms:model id="main"> >> > >> > ... >> > >> > </xforms:model> >> > >> > <xi:include href="additional_model.xhtml" /> >> > >> > ... >> > >> > Model is available tot he widget but instances can not be addressed >> > within xforms:listitem, xforms:submit etc. neither by calling >> > xxforms:instance nor by instance. >> > >> > How can I get information from the additional model? >> > >> > Any suggestions else to setup a modular model system? >> > >> > Who uses multiple models in a XForm, who uses xi:includes to have a >> > kind of plug-in architecture? What are your experiences? >> > >> > Regards and thx a lot in advance, >> > >> > Thorsten >> > >> > -- >> > 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 Orbeon's Blog: >> http://www.orbeon.com/blog/ 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 > > -- 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 |