Capturing keyboard strokes
Hello,
I know how I can trigger a Javascript function, when a certain key is pressed, for example by using the "onkeydown" handler that many JSF components have. However, how can I call a method in a backing bean from that JavaScript function?
I have a web application with several command buttons and I want to assign keyboard shortcuts to each of them.
Many thanks in advance,
Ulrich
[416 byte] By [
ulima] at [2007-11-27 3:21:13]

# 2
So you want java script to fire the button's action method, is that it? I think it might be something like:document.getElementById('nameOfForm:idOfButton').click();cheers,Illu
Illua at 2007-7-12 8:23:57 >

# 3
The approach "this.submit" may work with a single submission target, but not with multiple buttons calling different backing bean methods. I think the second suggestion is what I need, thank you very much. Would this also work for activating command links instead of command buttons?
Ulrich
ulima at 2007-7-12 8:23:57 >

# 5
I have tested with .click(), and .onclick(). The Update on server for fields will done. But the action, which calls a method is not done. Who can I start the action with Javascript?