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
Actually you can use the following syntax:
JSF creates an event chain and whatever you state under "onkeypress" will be evaluated BEFORE your f:ajax event. Thus you can return false to break the event chain. If you use the change event on f:ajax it'll of course fire on other change events which you probably don't want.