Vojtech
Vojtech

Reputation: 2603

How to implement Dojo autocomplete similar to jQuery UI autocomplete?

Good day, using JSP and jQuery UI I have successfuly implemented autocompletion for a text input. Autocomplete data are retrieved from a database and filtered by 'q' parameter on the server side. It returns all items containing queried string:

SELECT name FROM organization WHERE name LIKE '%q%';

Is there a way how to do the same with Dojo? I followed this Dojo tutorial , but when I type for example letter a into the text input the text in the text input get's replaced by first suggestion Ibam and my first letter a is replaced with I from word Ibam. It works strange. Please advise.

Vojtech

Upvotes: 7

Views: 9482

Answers (1)

phusick
phusick

Reputation: 7352

I would recommend dijit/form/ComboBox with dojo/store/JsonRest.

See it in action: http://jsfiddle.net/phusick/N8DqG/

Upvotes: 12

Related Questions