Re: Model inside the view

Posted by Erik Bruchez on
URL: https://discuss.orbeon.com/Model-inside-the-view-tp26923p26924.html

Tania,

As pointed out, you will have to remove the "xforms" attribute in your
page flow, as keeping it triggers the XForms Classic engine:

   http://www.orbeon.com/ops/doc/home-faq#xforms-classic-or-ng

Once that is done, you should tackle the next problem ;-)

I assume you want to update an XForms instance. I suggest, if not
already done, that you have a look at the following sections of the
documentation:

   http://www.orbeon.com/ops/doc/reference-page-flow#xml-submission
 
http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-instance-initialization

-Erik

Tania Magnenat wrote:
 > Hi everybody!
 >
 > How to update (in the page flow) a xforms model when the model is inside
 > the view?
 > If the model is separated from the view, I have no problem (the xforms
 > model is updated correctly with data from the previous model), but when
 > the model is inside the view it doesn't works.
 >
 > Page flow example where the update works:
 > =========================================
 >
 > <page id="travel" path-info="/travel" model="model-travel.xpl"
 > xforms="form-travel.xml" view="view-travel.xsl">
 >     <action when="/*/action='add-travel'">
 >         <result page="add-travel">
 >             <xu:update select="/form/id">
 >                 <xu:value-of
 > select="document('input:instance')/*/document/ProjectID"/>
 >             </xu:update>
 >         </result>
 >     </action>
 > </page>
 > <page id="add-travel" path-info="/add-travel" xforms="/travel/form.xml"
 > view="/travel/view.xhtml"/>
 >
 >
 > Page flow example where the update doesn't works:
 > ================================================
 >
 > <page id="travel" path-info="/travel" model="model-travel.xpl"
 > xforms="form-travel.xml" view="view-travel.xsl">
 >     <action when="/*/action='add-travel'">
 >         <result page="add-travel">
 >             <xu:update select="/form/id">
 >                 <xu:value-of
 > select="document('input:instance')/*/document/ProjectID"/>
 >             </xu:update>
 >         </result>
 >     </action>
 > </page>
 > <page id="add-travel" path-info="/add-travel" view="/travel/view.xhtml"/>
 >
 >
 > Thanks in advance!
 >
 > Tania
 >
 > P.S: I'm using OPS 3.0 beta 4




--
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