Hi
* how can I share instance b/w pages in ops 3.6 by using the xupdate, * And how realize navigation with buttons (Xforms:submit or xforms:trigger ..) I hope have an example Exple : I have page1.xhtml in which i ask the name, and i want to display this name in another page (page2.xhtml), the problem that when i use the function doc('input:instance') the engine return an error (can not load). Page 1 : <xforms:model> <xforms:instance xmlns=""> <xi:include href="input:instance"/> </xforms:instance> </xforms:model> </head> <body> <xforms:group ref="/personne"> <p>Nom : <xforms:input ref="nom" incremental="true"> </xforms:input> </p> </xforms:group> </body> .. Instance : <personne> <nom /> </personne> Page 2 : <xforms:model> <xforms:instance xmlns=""> <xi:include href="input:instance"/> </xforms:instance> </xforms:model> </head> <body> <xforms:group ref="/personne"> <p>Nom : <xforms:output ref="doc(input:instance')/nom" > </xforms:input> </p> </xforms:group> </body> .. Thanks and regards -- 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 |
hi rachid,
> * how can I share instance b/w pages in ops 3.6 by using the xupdate, > * And how realize navigation with buttons (Xforms:submit or > xforms:trigger ..) I recommend to start with the page flow definition: http://www.orbeon.com/ops/doc/reference-page-flow#d231e11 You just need two page definitions. These pages don't need a model, just a view. You may have to adjust the paths to the XHTML pages. <page id="ask-name" path-info="/ask-name" view="pages/test/ask-name.xhtml"/> <page id="show-name" path-info="/show-name" view="pages/test/show-name.xhtml"/> The ask-name page could look as follows: <?xml version="1.0" encoding="utf-8"?> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xhtml:head> <xhtml:title>Ask Name</xhtml:title> <xforms:model> <xforms:instance id="instance"> <personne xmlns=""> <nom /> </personne> </xforms:instance> <xforms:submission id="default-submission" method="post" replace="all" action="/show-name" ref="instance('instance')"> </xforms:submission> </xforms:model> </xhtml:head> <xhtml:body> <xhtml:p> <xforms:input ref="nom"> <xforms:label>Please enter a name: </xforms:label> </xforms:input> </xhtml:p> <xhtml:p> <xforms:submit submission="default-submission"> <xforms:label>OK</xforms:label> </xforms:submit> </xhtml:p> </xhtml:body> </xhtml:html> Note that you can't initialize the instance with input:instance if you don't have a input. So i defined the instance directly here. The submission sends the 'instance' instance to the page defined in the page flow for the action (path) "show-name". Because there's no model defined, the submitted instance is passed directly to the view so it's available there via the instance input of the page show-name.xhtml: <?xml version="1.0" encoding="utf-8"?> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events"> <xhtml:head> <xhtml:title>Show Name</xhtml:title> <xforms:model> <xforms:instance id="instance" src="input:instance"/> </xforms:model> </xhtml:head> <xhtml:body> <xhtml:p>Hello, <xforms:output ref="nom" /></xhtml:p> <xhtml:p> <xforms:trigger> <xforms:label>Back</xforms:label> <xforms:load ev:event="DOMActivate" resource="/ask-name" /> </xforms:trigger> </xhtml:p> </xhtml:body> </xhtml:html> Here, the instance is initialized using the src attribute as described here: http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-instance-initialization-pfc To return to the ask-name page, i inserted a simple trigger. Because there's no data to submit to that page, it's sufficient to simply load that page. HTH florian -- 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 |
Hi
I I applied what you said to me but resolutely, always i can't display data in the second page. you find attached my example Thanks and regards 2008/3/13, Florian Schmitt <[hidden email]>: hi rachid, -- 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 Test.rar (4K) Download Attachment |
Hi rachid,
> I I applied what you said to me but resolutely, always i can't display > data in the second page. > you find attached my example There's a small but fatal error in the display.xhtml file. Lines 25-27 are: <xforms:instance xmlns=""> <xforms:instance id="instance" src="input:instance"/> </xforms:instance> It should be only <xforms:instance id="instance" src="input:instance"/> Then it should work. HTH florian -- 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 |