Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom Control Settings storing a question identifier in the data
<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:acme="http://www.acme.com/xbl">
<xbl:binding element="acme|control-settings" id="acme-control-settings">
<xbl:handlers>
<xbl:handler event="fb-initialize" phase="target">
<xf:setvalue
ref="instance('i')/@question-identifier"
value="event('data-holders')/@question-identifier"/>
</xbl:handler>
<xbl:handler event="fb-apply" phase="target">
<xf:action iterate="event('data-holders')">
<xf:delete ref="@question-identifier"/>
<xf:insert context="." origin="instance('i')/@question-identifier"/>
</xf:action>
</xbl:handler>
</xbl:handlers>
<xbl:implementation>
<xf:model>
<xf:instance id="i">
<_ question-identifier=""/>
</xf:instance>
</xf:model>
</xbl:implementation>
<xbl:template>
<xh:div>
<xf:input ref="instance('i')/@question-identifier">
<xf:label>Question identifier</xf:label>
</xf:input>
</xh:div>
</xbl:template>
</xbl:binding>
</xbl:xbl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment