Skip to content

Commit

Permalink
Fix adding control in Form Builder creates a new xforms:bind for the …
Browse files Browse the repository at this point in the history
…same section
  • Loading branch information
avernet committed May 6, 2011
1 parent 1d7b376 commit 6df1f8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/resources/forms/orbeon/builder/form/model.xml
Expand Up @@ -623,7 +623,7 @@
select="if ($control-name) then $current-control/ancestor::fr:section[1]/(if (@context) then @context else substring-before(@bind, '-bind')) else $section-name"/>
<xxforms:variable name="is-custom-instance" select="$metadata-instance/form-instance-mode = 'custom'"/>
<xforms:action context="$model/xforms:bind[@id = 'fr-form-binds']">
<xforms:action if="not(xforms:bind[@name = $current-section-name])">
<xforms:action if="empty(xforms:bind[@name = $current-section-name])">
<xforms:insert context="." nodeset="xforms:bind" origin="instance('fb-bind-template')"/>
<xxforms:variable name="bind" select="xforms:bind[last()]" as="element(xforms:bind)"/>
<xforms:setvalue ref="$bind/@id" value="concat($current-section-name, '-bind')"/>
Expand Down
2 changes: 1 addition & 1 deletion src/resources/forms/orbeon/builder/form/template.xml
Expand Up @@ -40,7 +40,7 @@

<!-- Bindings -->
<xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')">
<xforms:bind id="section-1-bind" nodeset="section-1">
<xforms:bind id="section-1-bind" name="section-1" nodeset="section-1">
<xforms:bind id="control-1-bind" name="control-1" nodeset="control-1"/>
</xforms:bind>
</xforms:bind>
Expand Down

0 comments on commit 6df1f8f

Please sign in to comment.