So I have an inputText that has its value hook to myBean.text, I want that if I click enter/return key, the inputText will invoke a method inside
I decided to make this an answer so the code would be clearer than inlined as a comment, but Damo's solution is exactly what worked for me (so upvote his answer not this one ;-). I had a form with a text entry field and a search icon (a magnifying glass). I wanted the ajax query to be submitted by both a click on the magnifying class and pressing enter in the input text field. Clicking the icon in my original solution worked, but for the life of me I couldn't get pressing enter in the text field to submit the ajax call as well (it submitted the form via the normal mechanism instead). Here's the code that finally worked. Thanks again Damo.
p.s. - @BalusC: This is the rare case where your answer wasn't a 100% fit with what I was looking for but I've lost count of how many of your others have been. So thank you to you as well, and enjoy the book I sent you from your wishlist. If you'd ever like to do some consulting please check my profile and send me an email.
Regards,
par