title: How do PrimeFaces Selectors as in update="@(.myClass)" work?
body: <p>I don't understand how <a href="http://www.primefaces.org/showcase/ui/ajax/selector.xhtml" rel="noreferrer">PrimeFaces selectors</a> (<a href="http://blog.primefaces.org/?p=1867" rel="noreferrer">PFS</a>) work. </p>
  
  <pre><code>&lt;h:outputText value="#{bean.text1}" styleClass="myClass" /&gt;
  &lt;p:commandButton update="@(.myClass)" /&gt;
  </code></pre>
  
  <p>I can use it. And I think it's a fantastic tool although it doesn't function always for me. The <code>.myClass</code> is client side jQuery selector. How does JSF on server side know what to update?</p>
  
  <p>I can understand how normal <a href="https://stackoverflow.com/questions/8634156/cannot-find-component-with-expression-foo-referenced-from-bar-fajax-con">JSF ID selectors</a> work.</p>
  
  <pre><code>&lt;h:outputText value="#{bean.text1}" id="textId" /&gt;
  &lt;p:commandButton update="textId" /&gt;
  </code></pre>
  
  <p>The <code>textId</code> references an ID of component in the component tree as defined in XHTML file in server side. So I can understand how JSF finds the right component.</p>
  
  <p>But if you are using primefaces selectors, the client side jQuery selectors are used. How does JSF know which component has to be updated? Sometimes I have problems with PFS. It doesn't seem to function always for me. Is there something what you should keep in mind if you are using PFS?</p>