title: Primefaces Ajax calling Javascript
body: <p>I was wondering if you could call javascript inside of an ajax statment specificlly I am trying to get the following to work.</p>
  
  <pre><code>        &lt;p:commandLink id="saveButton" value="Save" &gt;
              &lt;p:ajax event="click" actionListener="#{bean.saveButtonPressed()}" /&gt;
              &lt;p:ajax event="click" actionListener="if(#{cbean.showSaveOverlay}){saveOverlay.show();}" /&gt;
          &lt;/p:commandLink&gt;
  </code></pre>
  
  <p>And showSaveOverly gets set inside saveButtonPressed.</p>
  
  <p>Any idea how I would do this?</p>