Select2's wicket integration should provide you with some pointers [1].
It basically points down to implementing a listener interface, and
providing the url to it to your javascript code. You can then return
your data when the listener interface's method is called.
[1]
https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/AbstractSelect2Choice.java
Met vriendelijke groet,
Kind regards,
Bas Gooren
Op 14-5-2013 22:36, schreef William Speirs:
I'm trying to create a typeahead component for Wicket that uses Bootstrap's
Typeahead:
To set this up though I need to provide the .typeahead method in JavaScript
with a function that will return the results, given the query. What I'd
like to do is attach that JavaScript function to a Java method much like
what is done with an AjaxEventBehavior [2]. I cannot figure out how to go
about setting all of this up... any ideas?
Thanks...
Bill-
[1] http://twitter.github.io/bootstrap/javascript.html#typeahead
[2]
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/ajax/AjaxEventBehavior.html