1 Reply Latest reply on Feb 12, 2009 10:29 AM by Wolfgang Knauf

    Calling Java script In JSF

    Debasree Saha Newbie

      Hi,

      Please advice me on how to call java script functions in JSF. My requirement is to call a validation function on clicking the "save" button to check if the all inputs are valid or not. I have written one java script within the jsf(xhtml) page and calling this method as

      <h:commandButton value="Confirm" action="#{check}"/>


      here check is the function. This function is as below:

      <jbpm:dataform>
      <h:form>
      //<![CDATA[
      function check()
      {
      alert("my function");
      }
      //]]>

      </h:form>
      .......
      </jbpm:dataform>

      Please tell where I am wrong. Why this function is not called.

      Thanks in advance.