Re: Handling OnKeyPress event

2010-12-29 Thread Tejash Tarun
Hi, I guess if we add AjaxFormComponentUpdatingBehavior() to the component then we can get the string from the model and then we can extract the (last) character keyed-in. This should work for normal characters. Regards, Tejash On Wed, Dec 29, 2010 at 1:05 PM, Josh Kamau joshnet2...@gmail.com

Re: Handling OnKeyPress event

2010-12-29 Thread Martin Grigorov
Hi Josh, This is pure JavaScript task. You need something like : onkeypress=if (event.keyCode !== 13) return; doSomething();. I.e. fast return if the key is not ENTER, otherwise do what you need to do. If you need this for Ajax component/behavior then see its getAjaxCallDecorator() method. See

Re: Handling OnKeyPress event

2010-12-29 Thread Bas Gooren
@wicket.apache.org Sent: Wednesday, December 29, 2010 9:40 AM Subject: Re: Handling OnKeyPress event Hi Josh, This is pure JavaScript task. You need something like : onkeypress=if (event.keyCode !== 13) return; doSomething();. I.e. fast return if the key is not ENTER, otherwise do what you need to do

Handling OnKeyPress event

2010-12-28 Thread Josh Kamau
Hi Team; Is there a way of handling onKey.. events in wicket, where by i will know which key was pressed. I specifically want to do some ajax update when Return key is pressed. Kind regards. Josh.