Orbeon Forms community mailing list
Login
Register
autocomplete from an external file
Posted by
cedric
on
Jan 06, 2010; 10:25am
URL:
https://discuss.orbeon.com/autocomplete-from-an-external-file-tp999708.html
I am trying to use the autocomplete feature using an external text file:
i followed the instructions of the urls below :
http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Autocomplete
http://www.orbeon.com/orbeon/doc/reference-xforms-guide
i also refered to the xforms-google-suggestion from the orbeon forms, to no avail. Any hints?
my code:
<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>
Free forum by Nabble
Edit this page