Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Created September 10, 2010 22:24
Show Gist options
  • Save ebruchez/574486 to your computer and use it in GitHub Desktop.
Save ebruchez/574486 to your computer and use it in GitHub Desktop.
[ #315441 ] XPath analysis: button doesn't change state in dialog edit control
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xh:head>
<xf:model xxf:xpath-analysis="true">
<xf:instance>
<text readonly="false">All the world's a stage…</text>
</xf:instance>
<xf:bind ref="." readonly="@readonly = 'true'"/>
</xf:model>
</xh:head>
<xh:body>
<fr:dialog-editor ref="." id="my-dialog-editor"/>
<fr:button>
<xf:label>Toggle readonly</xf:label>
<xf:setvalue ev:event="DOMActivate" ref="@readonly" value="if (. = 'true') then 'false' else 'true'"/>
</fr:button>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment