I\'m using the p:ajax
listener to handle value change events (because valueChangeListener
is launched on form submit):
You could try the following:
Implement the value change event in your bean
public void processValueChange(ValueChangeEvent e){
//foo the bar
}
Define a valueChangeListener
on your selection component
The key piece there is the submit()
bit that processes the enclosing form on change of the value. You can then getNewValue()
and getOldValue()
as necessary.
EDIT: Now that I think about it, I see no reason why you cannot leave your setup as-is and simply define the valueChangeListener
. It should still be processed during the change
event in the
, in fact, it will be processed before the listener for the ajax event itself.