I\'m using the p:ajax
listener to handle value change events (because valueChangeListener
is launched on form submit):
The ValueChangeListener should work this way:
The view:
The bean:
public void valueChangeListener(ValueChangeEvent e) {
System.out.println("valueChangeListener invoked:"
+ " OLD: " + e.getOldValue()
+ " NEW: " + e.getNewValue());
}
The above code will print if I change the text field from "hello" to "world":
valueChangeListener invoked: OLD: hello NEW: world