Created
February 4, 2016 01:52
-
-
Save avernet/5235e158927cfad6e2ae to your computer and use it in GitHub Desktop.
Using xxforms-value-changed with a test on the node changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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="my-instance"> | |
<instance> | |
<a/> | |
<b/> | |
</instance> | |
</xf:instance> | |
<xf:message event="xxforms-value-changed" | |
observer="my-instance" | |
if="event('node') = instance()/a" | |
value="'Changed'"/> | |
</xf:model> | |
</xh:head> | |
<xh:body> | |
<xf:trigger> | |
<xf:label>Set value</xf:label> | |
<xf:setvalue event="DOMActivate" ref="a">42</xf:setvalue> | |
</xf:trigger> | |
</xh:body> | |
</xh:html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment