I have multiple input field with a p:ajax with a listener. They all connect to the same listener. How can I know what component triggerd the listener?
It is almost same in primefaces:
import javax.faces.event.AjaxBehaviorEvent;
.....
public void retrievePostalCodeCity(AjaxBehaviorEvent event) {
...
}
If you want to access via button component action/actionListener tag you can use ActionEvent and for any case make sure you set ajax="true":
import javax.faces.event.ActionEvent;
....
public void retrievePostalCodeCity(ActionEvent event) {
...
}