You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Burton, Tom F (DOR)" <to...@alaska.gov> on 2011/01/04 21:08:32 UTC

AutoCompleteTextField - with an OnSelected event

Hello,

                I'm probably Doing this All Wrong.  I recently Wanted to
use AutoCompleteTextField and react "automatically" to the user making a
selection from the Drop Down Choice.  So I copied the Source for that
package into my project and modified it to work. (You'll notice it's no
longer in the
org.apache.wicket.extensions.ajax.markup.html.forms.autocomplete
namespace)   I thought I would offer up my modification here in hopes
that the changes could be incorporated back into the wicket extensions
package.

 

I Specifically modified the following files:

Wicket-autocomplete.js (added an call back to Java from inside
handleSelection(input))

AbstractAutoCompleteBehavior.java ( modified respond to check parameters
to see if OnSelection() should be called instead of onRequest() )

AutoCompleteTextField ( added the Method OnSelection(String,
AjaxRequestTarget) and the abstract method OnSelectionMade(T,
AjaxRequestTarget) )

 

However, I'm currently using 1.4 and started with the 1.4.14 version of
the files.

 

Please let me know what you think of the code as well as what my next
steps in regards to getting my changes incorporated should be,

Tom Burton