You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ilya Obshadko <il...@gmail.com> on 2014/06/05 10:25:48 UTC

[T5.4] Autocomplete mixin replacement

I have created a replacement for Tapestry Autocomplete mixin based on
latest Twitter typeahead.js.
I don't have time to publish it as a separate project, so there's a public
gist: https://gist.github.com/xfyre/5a235a2ff95df7609194

Key improvements & fixes:

* fixed broken CSS which leads to incorrect formatting of the input field
(this is actually not my job, I have found it elsewhere)
* allows to pass lists of any objects (not just strings) from event handler
that provides suggestions
* you may customize suggestion template so it matches your suggestion data
model (provide data keys you are using in suggestion template if you do so)

Feel free to use and improve it. If Tapestry contributors incorporate some
of those ideas into Autocomplete mixin, that would be even better.

Requirements: typeahead.js (bundled with Bloodhound) and Handlebars JS
library.

-- 
Ilya Obshadko