2 Replies Latest reply on Apr 11, 2007 4:44 PM by James Reynolds

    a4j:commandLink, onclick & javascript validation

    James Reynolds Newbie

      I have this command link on my page. In the onclick event, I run a javascript validation function that returns false if my criteria are not met.

      <a4j:commandLink id="popupSubmitBtn"
      value="SUBMIT" styleClass="btnForm"
      onclick="validateSearchInput();"
      action="#{claimsManagerBean.submitSearch}"
      reRender="listTable"/>


      I thought that returning false to a function called in the attribute would prevent the action attribute of the component from being fired. However, I'm seeing errors in the logs that indicate the method is being fired anyway. Am I mistaken? Is there a better way to do this?

      Thanks