Re: [Wicket-user] onkeydown or onkeyup
Hi, In fact we should never do an ajax submit on the 'onkeydown' event. 'onkeydown' is a typical event that is only very usefull on the client and I think that it's main purpose was to allow the cancellation of a key stroke. You can interprete it more like a 'beforekey' event. I don't think there is a usecase where you really want to use the onkeydown event, except maybe in the event that you want to hold down your key and that each character is submitted to the server. But then I think that this should never be allowed because somebody might just bring your server down. But if you really want to support the onkeydown event then it should be done the way it is done in wicket.extensions.ajax.markup.html.autocomplete.wicket-autocomplete.js. in there the value of the field is retrieved by using it's ID and not by passing a reference. In that case it seems that all characters are sent to the server even when using the 'onkeydown' event. But this behaviour could not be the same on all browsers. (I only tested it with Firefox) Byeee... -- View this message in context: http://www.nabble.com/onkeydown-or-onkeyup-t1506344.html#a4097293 Sent from the Wicket - User forum at Nabble.com. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] onkeydown or onkeyup
good, i think in this case we shouldnt make an ajax call until you release a key.-IgorOn 4/25/06, Johan Compagner < [EMAIL PROTECTED]> wrote:just a remark: what happens if i hold down the key? i do get this then:dummyyy(there is no key up..) On 4/25/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: fixed, thanks-Igor On 4/25/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: Hi,I finally managed to get my own search text field working but I think Imight have found a bug in one of the wicket examples.The problem is related to the behavior of the 'onkeydown' event. Whenever I press a key, only the previous key presses are submitted and not the currentone. (ex. when my field contains 'dumm' and I press the 'y' then only'dumm' will be submitted) This seems to be the default behaviour of (all?) browsers because the onkeydown event allows you to cancel a keypress, sothat in that case your field isn't updated. This means that I should usethe 'onkeyup' event. In that case everything works as it should. But the 'Ajax - BuiltIn - Form' example uses the 'onkeydown' event. You canclearly see the problem when you enter something in the 'Email' field. Themessage that is displayed in the FeedBackPanel never displays the last character that has been entered.Replacing it with the 'onkeyup' event should fix it.byeee...--View this message in context: http://www.nabble.com/onkeydown-or-onkeyup-t1506344.html#a4085010Sent from the Wicket - User forum at Nabble.com .--- Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] onkeydown or onkeyup
just a remark: what happens if i hold down the key?i do get this then:dummyyy(there is no key up..)On 4/25/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: fixed, thanks-Igor On 4/25/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: Hi,I finally managed to get my own search text field working but I think Imight have found a bug in one of the wicket examples.The problem is related to the behavior of the 'onkeydown' event. Whenever I press a key, only the previous key presses are submitted and not the currentone. (ex. when my field contains 'dumm' and I press the 'y' then only'dumm' will be submitted) This seems to be the default behaviour of (all?) browsers because the onkeydown event allows you to cancel a keypress, sothat in that case your field isn't updated. This means that I should usethe 'onkeyup' event. In that case everything works as it should. But the 'Ajax - BuiltIn - Form' example uses the 'onkeydown' event. You canclearly see the problem when you enter something in the 'Email' field. Themessage that is displayed in the FeedBackPanel never displays the last character that has been entered.Replacing it with the 'onkeyup' event should fix it.byeee...--View this message in context: http://www.nabble.com/onkeydown-or-onkeyup-t1506344.html#a4085010Sent from the Wicket - User forum at Nabble.com .--- Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] onkeydown or onkeyup
fixed, thanks-IgorOn 4/25/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: Hi,I finally managed to get my own search text field working but I think Imight have found a bug in one of the wicket examples.The problem is related to the behavior of the 'onkeydown' event. Whenever I press a key, only the previous key presses are submitted and not the currentone. (ex. when my field contains 'dumm' and I press the 'y' then only'dumm' will be submitted) This seems to be the default behaviour of (all?) browsers because the onkeydown event allows you to cancel a keypress, sothat in that case your field isn't updated. This means that I should usethe 'onkeyup' event. In that case everything works as it should. But the 'Ajax - BuiltIn - Form' example uses the 'onkeydown' event. You canclearly see the problem when you enter something in the 'Email' field. Themessage that is displayed in the FeedBackPanel never displays the last character that has been entered.Replacing it with the 'onkeyup' event should fix it.byeee...--View this message in context: http://www.nabble.com/onkeydown-or-onkeyup-t1506344.html#a4085010Sent from the Wicket - User forum at Nabble.com.--- Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] onkeydown or onkeyup
Hi, I finally managed to get my own search text field working but I think I might have found a bug in one of the wicket examples. The problem is related to the behavior of the 'onkeydown' event. Whenever I press a key, only the previous key presses are submitted and not the current one. (ex. when my field contains 'dumm' and I press the 'y' then only 'dumm' will be submitted) This seems to be the default behaviour of (all?) browsers because the onkeydown event allows you to cancel a keypress, so that in that case your field isn't updated. This means that I should use the 'onkeyup' event. In that case everything works as it should. But the 'Ajax - BuiltIn - Form' example uses the 'onkeydown' event. You can clearly see the problem when you enter something in the 'Email' field. The message that is displayed in the FeedBackPanel never displays the last character that has been entered. Replacing it with the 'onkeyup' event should fix it. byeee... -- View this message in context: http://www.nabble.com/onkeydown-or-onkeyup-t1506344.html#a4085010 Sent from the Wicket - User forum at Nabble.com. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user