Can h:inputText invoke a method inside managed bean when I press the return/enter key

前端 未结 6 1355
孤城傲影
孤城傲影 2021-02-03 14:54

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

6条回答
  •  执念已碎
    2021-02-03 15:12

    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.

    You need to add this. in front of onchange().

    
        
    
    

提交回复
热议问题