I can use IDs of components or a styleClass used in all of the components.
<p:ajax event="change" process="@none" listener="#{someListener()}"
update="@(.someStyleClass)"/>
<p:ajax event="change" process="@none" listener="#{someListener()}"
update="someId1 someId2 someId3"/>
Which approach is better and why?
EDIT: I know that CSS selector uses IDs in the background. I am not asking how it works. I am asking which is a better approach ( for maybe different cases ) and why.