Я использую элемент управления автозаполнением orbeon form Builder, который я изменил в режиме редактирования, чтобы он соответствовал синтаксису режима ресурса автозаполнения, например:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="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:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:exforms="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/">
<xhtml:head>
<xhtml:title>Test Autocomplete</xhtml:title>
<xhtml:style>
.fr-autocomplete-container .yui-ac-content {
overflow-x: hidden;
overflow-y: auto;
max-height: 100px;
*height:expression(this.scrollHeight>100?"100px":"auto");}
</xhtml:style>
<xforms:model id="fr-form-model">
<!-- Main instance -->
<xforms:instance id="fr-form-instance">
<form>
<address>
<street/>
<number/>
<zip/>
<city/>
</address>
</form>
</xforms:instance>
<!-- Bindings -->
<xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')">
<xforms:bind id="address-bind" nodeset="address">
<xforms:bind id="number-bind" nodeset="number" name="number"/>
<xforms:bind id="zip-bind" nodeset="zip" type="xforms:string" readonly="true()" name="zip"/>
<xforms:bind id="city-bind" nodeset="city" type="xforms:string" readonly="true()"
name="city"/>
<xforms:bind id="street-bind" nodeset="street" type="xforms:string" name="street"/>
</xforms:bind>
</xforms:bind>
<!-- Metadata -->
<xforms:instance id="fr-form-metadata" xxforms:readonly="true">
<metadata>
<application-name>MyApp</application-name>
<form-name>test_autocomplete</form-name>
<title xml:lang="en">Test Autocomplete</title>
<description xml:lang="en"/>
<author/>
<logo mediatype="" filename="" size=""/>
</metadata>
</xforms:instance>
<!-- Attachments -->
<xforms:instance id="fr-form-attachments">
<attachments>
<css mediatype="text/css" filename="" size=""/>
<pdf mediatype="application/pdf" filename="" size=""/>
</attachments>
</xforms:instance>
<!-- All form resources -->
<!-- Don't make readonly by default in case a service modifies the resources -->
<xforms:instance id="fr-form-resources" xxforms:readonly="false">
<resources>
<resource xml:lang="en">
<street>
<label>Rue</label>
<hint/>
<help/>
<alert/>
</street>
<address>
<label>Coordonees</label>
<help/>
</address>
<number>
<label>Num</label>
<hint/>
<help/>
<alert/>
</number>
<zip>
<label>Code postal</label>
<hint/>
<help/>
<alert/>
</zip>
<city>
<label>Localite</label>
<hint/>
<help/>
<alert/>
</city>
</resource>
</resources>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body>
<fr:view>
<xforms:label ref="instance('fr-form-metadata')/title"/>
<fr:body>
<fr:section id="address-section" bind="address-bind">
<xforms:label ref="$form-resources/address/label"/>
<xforms:help ref="$form-resources/address/help"/>
<fr:grid columns="2">
<xhtml:tr>
<xhtml:td>
<widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget" id="orbeon-xforms-inspector"/>
</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:td>
<fr:autocomplete xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
bind="street-bind"
appearance="minimal"
id="street-control"
ref="."
resource="https://myHTTPServiceUrl/streets/getByCriteria.do?language=FR&streetName={event('fr-search-value')}"
dynamic-itemset="true" >
<xforms:label ref="$form-resources/street/label"/>
<xforms:hint ref="$form-resources/street/hint"/>
<xforms:help ref="$form-resources/street/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
<xforms:itemset nodeset="/results/result">
<xforms:label ref="/Street/name"/>
<xforms:value ref="/Street/name"/>
</xforms:itemset>
</fr:autocomplete>
</xhtml:td>
<xhtml:td>
<xforms:input xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
bind="number-bind"
id="number-control">
<xforms:label ref="$form-resources/number/label"/>
<xforms:hint ref="$form-resources/number/hint"/>
<xforms:help ref="$form-resources/number/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
</xforms:input>
</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:td>
<xforms:input xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
bind="zip-bind"
id="zip-control">
<xforms:label ref="$form-resources/zip/label"/>
<xforms:hint ref="$form-resources/zip/hint"/>
<xforms:help ref="$form-resources/zip/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
</xforms:input>
</xhtml:td>
<xhtml:td>
<xforms:input xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
bind="city-bind"
id="city-control">
<xforms:label ref="$form-resources/city/label"/>
<xforms:hint ref="$form-resources/city/hint"/>
<xforms:help ref="$form-resources/city/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
</xforms:input>
</xhtml:td>
</xhtml:tr>
</fr:grid>
</fr:section>
</fr:body>
</fr:view>
</xhtml:body>
Когда я тестирую его в формебегун Я вижу, что событие 'fr-search-Changed' запускается и значение поиска меняется, но я не вижу заполненный набор элементов.Можете ли вы сказать мне, что не так в коде, пожалуйста?Также я уверен, что сервис действительно возвращает результаты с тем, что я тестировал