Last active
August 29, 2015 14:11
-
-
Save ebruchez/8d7e9ebd7f7b90911ecb to your computer and use it in GitHub Desktop.
This file contains 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
<html xmlns="http://www.w3.org/1999/xhtml" | |
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:fr="http://orbeon.org/oxf/xml/form-runner" | |
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> | |
<head> | |
<title>Test</title> | |
<xf:model> | |
<xf:instance id="people-instance"> | |
<people xmlns=""> | |
<person> | |
<test/> | |
</person> | |
</people> | |
</xf:instance> | |
<xf:bind id="test-bind" name="test" ref="person/test"/> | |
</xf:model> | |
<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:fb="http://orbeon.org/oxf/xml/form-builder"> | |
<xbl:binding element="fr|my-name" id="fr-my-name" xxbl:mode="lhha binding value"> | |
<xbl:implementation> | |
<xf:model> | |
<xf:instance> | |
<value/> | |
</xf:instance> | |
<xf:submission | |
id="save-submission" | |
ref="instance()" | |
action="http://Eriks-MacBook-Pro.local:8080/orbeon/fr/service/custom/orbeon/echo" | |
method="put" | |
replace="none"> | |
<xf:message event="xforms-submit-error" level="modal">An error occurred while saving!</xf:message> | |
</xf:submission> | |
</xf:model> | |
</xbl:implementation> | |
<xbl:template> | |
<xf:var name="test-avt" xbl:attr="xbl:text=test" xxbl:scope="outer"/> | |
<xf:var name="test"> | |
<xxf:sequence value="xxf:evaluate-avt($test-avt)" xxbl:scope="outer"/> | |
</xf:var> | |
<xf:var name="value" value="xxf:binding-context('fr-my-name')/root()//*[name() = $test]/string()"> | |
<xf:action event="xforms-enabled xforms-value-changed"> | |
<xf:setvalue ref="instance()" value="$value"/> | |
<xf:send submission="save-submission"/> | |
</xf:action> | |
</xf:var> | |
</xbl:template> | |
</xbl:binding> | |
</xbl:xbl> | |
</head> | |
<body> | |
<xf:input id="test-control" bind="test-bind"> | |
<xf:label>THIS</xf:label> | |
</xf:input> | |
<fr:my-name test="test"/> | |
<fr:xforms-inspector/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment