Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Created May 20, 2025 21:45
Show Gist options
  • Save ebruchez/f6e384cb0d18791066239b6e0c36eeb9 to your computer and use it in GitHub Desktop.
Save ebruchez/f6e384cb0d18791066239b6e0c36eeb9 to your computer and use it in GitHub Desktop.
Dynamic Dropdown With Search does not support value update #7040
<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-1>
<with-search-in/>
<dynamic-with-search/>
</grid-1>
</section-1>
<section-2>
<grid-2>
<without-search-in/>
<dynamic-without-search/>
</grid-2>
</section-2>
</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-1-bind" ref="grid-1" name="grid-1">
<xf:bind id="dynamic-with-search-bind" ref="dynamic-with-search"
name="dynamic-with-search"
calculate="$with-search-in"
readonly="false()"/>
<xf:bind id="with-search-in-bind" ref="with-search-in" name="with-search-in"
xxf:whitespace="trim"/>
</xf:bind>
</xf:bind>
<xf:bind id="section-2-bind" ref="section-2" name="section-2">
<xf:bind id="grid-2-bind" ref="grid-2" name="grid-2">
<xf:bind id="without-search-in-bind" ref="without-search-in" name="without-search-in"
xxf:whitespace="trim"/>
<xf:bind id="dynamic-without-search-bind" ref="dynamic-without-search"
name="dynamic-without-search"
calculate="$without-search-in"
readonly="false()"/>
</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>7040</form-name>
<title xml:lang="en">Dynamic Dropdown With Search does not support value update #7040</title>
<description xml:lang="en"/>
<library-versions>
<_>1</_>
<orbeon>1</orbeon>
</library-versions>
<created-with-version>2024.1-SNAPSHOT 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">
<without-search-in>
<label>In</label>
<hint/>
</without-search-in>
<dynamic-without-search>
<label>Dyn</label>
<hint/>
</dynamic-without-search>
<with-search-in>
<label>In</label>
<hint/>
</with-search-in>
<dynamic-with-search>
<label>Dyn</label>
<hint/>
</dynamic-with-search>
<section-1>
<label>With Search</label>
</section-1>
<section-2>
<label>Without Search</label>
<help/>
</section-2>
</resource>
</resources>
</xf:instance>
</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">
<xf:label ref="$form-resources/section-1/label"/>
<fr:grid id="grid-1-grid" bind="grid-1-bind">
<fr:c y="1" x="1" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="with-search-in-control"
bind="with-search-in-bind">
<xf:label ref="$form-resources/with-search-in/label"/>
<xf:hint ref="$form-resources/with-search-in/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c y="1" x="7" w="6">
<fr:databound-select1 xmlns="http://orbeon.org/oxf/xml/form-builder"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
id="dynamic-with-search-control"
bind="dynamic-with-search-bind"
resource="/fr/service/custom/orbeon/controls/countries?all=true"
appearance="search"
service-performs-search="false"
service-supports-paging="false"
is-last-page="">
<xf:label ref="$form-resources/dynamic-with-search/label"/>
<xf:hint ref="$form-resources/dynamic-with-search/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:grid>
</fr:section>
<fr:section id="section-2-section" bind="section-2-bind">
<xf:label ref="$form-resources/section-2/label"/>
<fr:grid id="grid-2-grid" bind="grid-2-bind">
<fr:c x="1" y="1" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="without-search-in-control"
bind="without-search-in-bind">
<xf:label ref="$form-resources/without-search-in/label"/>
<xf:hint ref="$form-resources/without-search-in/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="1" w="6">
<fr:databound-select1 xmlns="http://orbeon.org/oxf/xml/form-builder"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
id="dynamic-without-search-control"
bind="dynamic-without-search-bind"
resource="/fr/service/custom/orbeon/controls/countries?all=true"
ref="">
<xf:label ref="$form-resources/dynamic-without-search/label"/>
<xf:hint ref="$form-resources/dynamic-without-search/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: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