Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Created September 24, 2010 19:13
Show Gist options
  • Save ebruchez/595868 to your computer and use it in GitHub Desktop.
Save ebruchez/595868 to your computer and use it in GitHub Desktop.
[ #315426 ] Spurious help icon appearing upon control becoming relevant
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xh="http://www.w3.org/1999/xhtml">
<xh:head>
<xf:model>
<xf:instance>
<instance>
<value/>
<show-help>false</show-help>
<help/>
</instance>
</xf:instance>
<xf:bind ref="value" relevant="../show-help = 'true'"/>
</xf:model>
</xh:head>
<xh:body>
<xf:trigger>
<xf:label>Toggle</xf:label>
<xf:setvalue ev:event="DOMActivate" ref="show-help" value="if (. = 'true') then 'false' else 'true'"/>
</xf:trigger>
<xh:br/>
<xf:input ref="help">
<xf:label>Help message:</xf:label>
</xf:input>
<xh:br/>
<xf:input ref="value">
<xf:label>Value:</xf:label>
<xf:help ref="../help"/>
</xf:input>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment