title: Executing actionListener after the JS call returns true
body: <p>I have a code like:</p>
  
  <pre><code>&lt;p:commandButton actionListener="#{userLeaveBean.addAppliedLeave}" styleClass="apply_button" value="Create Leave" onclick="validateApplyLeave();"&gt;
      &lt;f:attribute name="userId" value="#{employee.name}"/&gt;
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <p>Here I want the <code>actionListener</code> to get fired if the javascript validation returns true and if it returns false, the <code>actionListener</code> should not get fired. But in this case after the java script validation, even if the value returned is false, the <code>actionListener</code> fires. How can I manage it?</p>
  
  <p>Thanks in advance.</p>