title: How to invoke click on p:button automatically in PrimeFaces
body: <p>I have a p:button that opens a new tab, i want to invoke the click automatically on this button from another component in the same page</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p:button id="newTab" value="Open" href="https://www.google.com" target="_blank" /&gt;
  </code></pre>
  
  <p>I have tried the JS click but i doesn't work (it works for p:commandButton)</p>
  
  <pre class="lang-js prettyprint-override"><code>function openTab() {
      $('#form\\:newTab').click();
  }
  </code></pre>
  
  <p>Does any one have an idea, thanks in advance !</p>