auto-completion from an external file
Posted by
cedric on
Jan 11, 2010; 9:05am
URL: https://discuss.orbeon.com/auto-completion-from-an-external-file-tp1011090.html
<html xmlns:xforms="
http://www.w3.org/2002/xforms" xmlns:xs="
http://www.w3.org/2001/XMLSchema"xmlns:xhtml="
http://www.w3.org/1999/xhtml" xmlns:xxforms="
http://orbeon.org/oxf/xml/xforms" xmlns="
http://www.w3.org/1999/xhtml" xmlns:ev="
http://www.w3.org/2001/xml-events" xmlns:atom="
http://www.w3.org/2005/Atom" xmlns:fr="
http://orbeon.org/oxf/xml/form-runner" >
<head>
<xforms:model>
<xforms:instance id="customer-instance">
<customers xmlns="" >
<customer>
<firstname/>
<lastname/>
<age/>
</customer>
</customers>
</xforms:instance>
<xforms:instance id="remote">
<remote/>
</xforms:instance>
<xforms:submission id="suggest"
serialization="none"
method="get" action="
http://localhost:9080/orbeon/saving/text" replace="instance" instance="remote"/>
</xforms:model>
</head>
<body>
<xforms:group ref="customer">
<xforms:input ref="firstname" incremental="true()" >
<xforms:label>First Name</xforms:label>
</xforms:input>
<xforms:input ref="lastname" incremental="true()" >
<xforms:label>Last Name</xforms:label>
</xforms:input>
<xforms:input ref="age" incremental="true()" >
<xforms:label>Age</xforms:label>
</xforms:input>
<fr:autocomplete ref="instance('customer-instance')" dynamic-itemset="false"
style="width: 15em">
<xforms:label>Enter a country name: </xforms:label>
<xforms:itemset nodeset="instance('remote')/name">
<xforms:label ref="fname"/>
<xforms:value ref="fname"/>
</xforms:itemset>
<xforms:send ev:event="xforms-value-changed" submission="suggest"/>
</fr:autocomplete>
</xforms:group>
</body>
</html>
This is my external file where i get the values to be autocompleted
<name>
<fname>cedric</fname>
<lname>nabaa</lname>
</name>