JSF Page:
<p:commandButton>
<p:ajax process="@this" update="name desc msg"
listener="#{bean.deleteListener}"/>
</p:commandButton>
Bean:
public void deleteListener() {
if (data.size() == 0) {
// updates only "msg"
setMsg("There is no data to delete");
return;
}
setMsg("Data deleted.");
// and updates the bean values for "name" and "desc" also.
...
}
Is it possible to conditionally update for an ajax call based on ajax listener logic. I would like to update the client ids "name desc msg" conditionally as shown in the listener code below (note this is a sample scenario in a larger application). The application uses Primefaces 5. Thanks.