Skip to content

Instantly share code, notes, and snippets.

@avernet
Created March 19, 2015 17:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save avernet/c2d54f0d13ad603b005a to your computer and use it in GitHub Desktop.
Checkboxes with values from a dictionary
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xh:head>
<xf:model>
<xf:instance id="data">
<data/>
</xf:instance>
<xf:instance id="items">
<items>
<item>
<id>1</id>
<name>One</name>
</item>
<item>
<id>2</id>
<name>Two</name>
</item>
</items>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<xf:select appearance="full" ref=".">
<xf:itemset ref="instance('items')/item">
<xf:label ref="name"/>
<xf:value ref="id"/>
</xf:itemset>
</xf:select>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment