I\'d like to execute valueChangeListener
for p:inputText
when user changes text and inputText looses focus (onchange). Is this possible? For now it
The valueChangeListener
method requires a form submit to be invoked. This is a server side event, not a client side event or so. Just changing and blurring the input does by default not submit the form at all. Bring in a
to do the magic.
However, although you didn't tell anything about the concrete functional requirement for which you thought that this is the right solution, I just wanted to mention that the valueChangeListener
is more than often the wrong tool for the job you had in mind. Use
instead.
Note that this would then make it possible to pass method arguments by EL 2.2, which would immediately then answer the possible underlying functional requirement of your other — actually pretty poor — question.
Also note that this might not be the solution at all if you're actually interested on the entered value; you could just access the inputValue
property directly.