Ok, so these are my notes regarding our method for getting Orbeon to load an instance based on some parameters that were sent to the XForm. This posting follows on from where my previous post left off:
In the model declaration of view.xhtml, I've created two minimal instances:
<xf:instance id="first-instance">
<first-instance />
</xf:instance>
<xf:instance id="second-instance">
<second-instance />
</xf:instance>
I'm also adding this piece in - as discussed in the last post - this resolves the get parameters and stores the information in the instance, so you can access the parameters using XPath:
<xf:instance id="edit-params" src="input:instance"/>
We're initialising two ev:events; these fire at different times but both should have fired by the time the XForm has been rendered onscreen:
<xf:send ev:event="xforms-model-construct-done" submission="load-first"/>
<xf:send ev:event="xforms-ready" submission="load-second"/>
As the form loads, xforms-model-construct-done should fire first; xforms-ready should fire soon after that.
So here's the code for the first submission:
<xf:submission id="load-first" method="get" resource="http://path/to/your/load-first-xquery.xq?
id={instance('edit-params')//id}" replace="instance" instance="first-instance"/>
And here's similar code for the second submission - for the sake of example here, I'm using 2 parameters when calling this one...
<xf:submission id="load-second" method="get" resource="http://path/to/your/load-second-xquery.xq?
id={instance('edit-params')//id}&id2={instance('edit-params')//id2}" replace="instance" instance="second-instance"/>
Hope this helps someone.
Friday, May 9, 2008
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(23)
-
▼
June
(10)
- Daisy CMS - connecting a JMS listener to the repos...
- Daisy CMS - customising the footer of the editor p...
- Daisy CMS - allowing attributes in the SimpleDocum...
- JSF - ensuring your [xhtml] pages load with a text...
- Eclipse Galileo (3.5): Creating and running a JSF ...
- Using Eclipse Galileo to develop JSF applications ...
- SVN Web view - looking at older revisions
- Notes on setting up mod_proxy on apache 2.2 for pr...
- Addressing stability issues when running Eclipse 3...
- Forcing glassfish 2.1 to start-up with JDK1.6 (OSX...
-
►
April
(6)
- XSLT, text-transform:captialize and Excel workbook...
- Structure for Regular Expressions in Javascript
- SQL Server : Granting EXEC on Stored Procedures
- Eclipse : Save Actions for autoformatting code and...
- Eclipse : Display heap status (like IntelliJ IDEA)...
- Eclipse : Display Java Type Indicator for classes
-
▼
June
(10)
0 comments:
Post a Comment