Hi. I have a Form containing some inputTexts and one commandButton. Is there any simple way to make the "Enter"-key make the commandButton to trigger? It feels very very inefficient to have a "onkeydown" listeners for every textfield that listens to every key press.... Any ideas?
Yes, but there's a catch. In most web browsers, when you have a single submit button, pressing "Enter" will submit the form.
However, the old offender: Internet Explorer, won't do that. So you have to put in browser-specific hacks. They're just gnarly enough that I don't remember the details, but you can Google for them. It's an HTML problem, not a JSF problem, so non-JSF apps have the save troubles.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jul 17, 2011
I´m not convinced. I´m using Chrome and this dose not trigger the button when I press "Enter" in selected textField: