JSF, Java Server Faces, Primefaces.
I am struggling to find a solution on how to change the update attribute of a <p:ajax
Scenario: A Dialog with a <p:ajax to capture the close event
<p:dialog modal="true">
<p:ajax event="close" update="COMPONENT IDs"
listener="#{bean.onClose()}" />
I would like to change the update attribute when I open the dialog.
I tried
-
using an EL expression value to get the changing attribute value from a bean.
This does not work as the attribute value is set at first rendering and never again -
Adding the update component IDs in the listener method of the bean:
PrimeFaces.current().ajax().update("component IDs");
This works.
BUT: Not for PrimeFaces Selectors (PFS). And I need that.
Like update=”@(.mystyle)”
(I guess because in that case components are selected client sidy by jquery.)
Any ideas?
Thank you
Peter