Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ebruchez/2f9182588e472273d0afa7ede45ac722 to your computer and use it in GitHub Desktop.

Select an option

Save ebruchez/2f9182588e472273d0afa7ede45ac722 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?><xh:html 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:array="http://www.w3.org/2005/xpath-functions/array" xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:exf="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:saxon="http://saxon.sf.net/" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fb="http://orbeon.org/oxf/xml/form-builder">
<xh:head>
<xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true">
<!-- Main instance -->
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
<form>
<section-1>
<grid-2>
<grid-2-iteration><source-control/>
<destination-control/>
</grid-2-iteration><grid-2-iteration><source-control/><destination-control/></grid-2-iteration>
</grid-2>
</section-1>
</form>
</xf:instance>
<!-- Bindings -->
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
<xf:bind id="section-1-bind" name="section-1" ref="section-1">
<xf:bind id="grid-2-bind" ref="grid-2" name="grid-2">
<xf:bind id="grid-2-iteration-bind" ref="grid-2-iteration" name="grid-2-iteration"><xf:bind id="source-control-bind" ref="source-control" name="source-control"/><xf:bind id="destination-control-bind" ref="destination-control" name="destination-control" xxf:whitespace="trim"/>
</xf:bind>
</xf:bind>
</xf:bind>
</xf:bind>
<!-- Metadata -->
<xf:instance id="fr-form-metadata" xxf:readonly="true" xxf:exclude-result-prefixes="#all">
<metadata>
<application-name>issue</application-name>
<form-name>7464</form-name>
<title xml:lang="en">Action targeting repeated iteration on same line doesn't work #7464</title>
<description xml:lang="en"/>
<library-versions>
<_>1</_><orbeon>2</orbeon><app>2</app>
</library-versions>
<created-with-version>1.2512.0 PE</created-with-version>
<email><templates><template name="default"><headers/><exclude-from-all-control-values/></template></templates><parameters/></email></metadata>
</xf:instance>
<!-- Attachments -->
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
<attachments/>
</xf:instance>
<!-- All form resources -->
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
<resources>
<resource xml:lang="en"><source-control><label>Source</label><hint/></source-control>
<destination-control><label>Destination</label><hint/>
</destination-control>
<section-1>
<label/>
</section-1>
</resource>
</resources>
</xf:instance>
<xf:instance xxf:readonly="true" xxf:exclude-result-prefixes="#all" id="grid-2-template"><grid-2-iteration><source-control/><destination-control/></grid-2-iteration></xf:instance>
<xf:instance id="echo-instance" class="fr-service" xxf:exclude-result-prefixes="#all">
<body xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" xmlns:fbf="java:org.orbeon.oxf.fb.FormBuilderXPathApi">&lt;_/&gt;</body>
</xf:instance>
<xf:submission id="echo-submission" class="fr-service" resource="/fr/service/custom/orbeon/echo" method="post" serialization="application/xml" mediatype="application/xml"/>
<xf:action id="equipdata-action-binding">
<xf:action xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:d="DAV:" xmlns:utils="java:org.orbeon.oxf.util.StringUtils" xmlns:frf="java:org.orbeon.oxf.fr.FormRunner" xmlns:fbf="java:org.orbeon.oxf.fb.FormBuilderXPathApi" xmlns:secure="java:org.orbeon.oxf.util.SecureUtils" xmlns:Wizard="java:org.orbeon.xbl.Wizard" event="xforms-value-changed" ev:observer="source-control-control" if="true()">
<xf:send submission="echo-submission"/>
</xf:action>
<xf:action xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:d="DAV:" xmlns:utils="java:org.orbeon.oxf.util.StringUtils" xmlns:frf="java:org.orbeon.oxf.fr.FormRunner" xmlns:fbf="java:org.orbeon.oxf.fb.FormBuilderXPathApi" xmlns:secure="java:org.orbeon.oxf.util.SecureUtils" xmlns:Wizard="java:org.orbeon.xbl.Wizard" event="xforms-submit" ev:observer="echo-submission">
<xf:var name="request-instance-name" value="'echo-instance'"/>
<xf:action>
<xf:action class="fr-set-service-value-action"><xf:var name="source-path" value="concat($source-control, ' result!')"/><xf:var name="path" value="/*"/></xf:action>
</xf:action>
</xf:action>
<xf:action xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:d="DAV:" xmlns:utils="java:org.orbeon.oxf.util.StringUtils" xmlns:frf="java:org.orbeon.oxf.fr.FormRunner" xmlns:fbf="java:org.orbeon.oxf.fb.FormBuilderXPathApi" xmlns:secure="java:org.orbeon.oxf.util.SecureUtils" xmlns:Wizard="java:org.orbeon.xbl.Wizard" event="xforms-submit-done" ev:observer="echo-submission">
<xf:action class="fr-set-control-value-action"><xf:var name="control-name" value="'destination-control'"/><xf:var name="control-value" value="/*"/></xf:action>
</xf:action>
</xf:action>
</xf:model>
</xh:head>
<xh:body>
<fr:view>
<fr:body xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors">
<fr:section id="section-1-section" bind="section-1-bind">
<fr:grid id="grid-2-grid" bind="grid-2-bind" repeat="content" min="1" template="instance('grid-2-template')" apply-defaults="true" fb:initial-iterations="first">
<fr:c x="1" y="1" w="6"><fr:databound-select1 xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" id="source-control-control" resource="/fr/service/custom/orbeon/controls/countries?all=true" bind="source-control-bind">
<xf:label ref="$form-resources/source-control/label"/>
<xf:hint ref="$form-resources/source-control/hint"/><xf:alert ref="$fr-resources/detail/labels/alert"/>
<xf:itemset ref="/countries/country">
<xf:label ref="name"/>
<xf:value ref="us-code"/>
<xf:hint ref="''"/>
</xf:itemset>
</fr:databound-select1>
</fr:c>
<fr:c x="7" y="1" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="destination-control-control" bind="destination-control-bind">
<xf:label ref="$form-resources/destination-control/label"/>
<xf:hint ref="$form-resources/destination-control/hint"/><xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
</fr:grid>
</fr:section>
</fr:body>
</fr:view>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment