How to configure a dynamic autocomplete in Orbeon Forms? -
i need use dynamic autocomplete based on ws rest show suggestions of field. used didn't work, didn't update list of suggestions. example:
<fr:autocomplete id="control-3-control" appearance="minimal" labelref="@label" resource="http://127.0.0.1/api/ws/pays/all" bind="control-3-bind"> <xf:label ref="$form-resources/control-3/label"/> <xf:hint ref="$form-resources/control-3/hint"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> <xf:itemset ref="./_"> <xf:label ref=".//libelle"/> <xf:value ref=".//id"/> </xf:itemset> </fr:autocomplete>
and screenshot:
doing "filtering" based on value entered users responsibility of service autocomplete calling. however, can't if don't provide current value of field. this, use {$fr-search-value}
somewhere in url, e.g. like:
http://127.0.0.1/api/ws/pays/all?search={$fr-search-value}
and of course, service needs take value of search
request parameter account. autocomplete component automatically call service again , again, necessary users type in field.
this allows search in large dataset without having return whole set of possible values orbeon forms.
Comments
Post a Comment