mercredi 6 mai 2015

AjaxFormComponentUpdatingBehavior onkeypress

I have a list of items, above which there is an input fields.
The input field is a filter, it should filter the list based on the text you key in to the input field.

For example : If you type "th", it should filter the list so that all the items should start with "th".

For this I am using AjaxFormComponentUpadingBehavior("onkeypress").
But this does not seem to be working they way it should.
When I key in something it clears up that and takes the cursor to the first letter of the input field.

I have tried onkeyup and onkeydown, and all of them act the same way.
For now I am doing the filter on a link click which works, but I want it to be as seamless as onkeypress.

Is there a way to achieve this? I am using wicket 1.4.x




Aucun commentaire:

Enregistrer un commentaire