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
inputText
myBean.text
I had the same problem and since I don't have enough reputation jet, I post this as an answer.
In my case there are multiple inputs which need to be submitted with f:ajax separately. I needed to improve the solution of BalusC a bit.
f:ajax
You need to add this. in front of onchange().
this.
onchange()