title: get rowIndex in rowEdit ajax event
body: <p>I have an editable dataTable (row edit mode). When I edit row and click tick to confirm new value, I would like to validate some columns (some of them are required) using jqxvalidator. So, when a tick is clicked, <code>validateRule(#{rowIndex});</code> function should validate the row which was just edited, but <code>rowIndex</code> value passed to this function is <code>undefined</code>. </p>
  
  <p>Is there any other way to get row index and pass it to JavaScript function?</p>
  
  <p>Some of my xhtml code:</p>
  
  <pre><code>&lt;p:dataTable id="tblRule" var="item" value="#{bean.ruleList}" binding="#{bean.dtRules}" editable="true"
      editMode="row" rowIndexVar="rowIndex" widgetVar="tblRuleWidget"&gt;
      &lt;p:ajax event="rowEdit" listener="#{bean.doEdit}" update="tblRule" onstart="validateRule(#{rowIndex}); " /&gt;
      &lt;p:ajax event="rowEditCancel" onstart="hideValidatorMsg();" /&gt;
  
      &lt;p:column&gt;
          &lt;p:rowEditor /&gt;
      &lt;/p:column&gt;
      &lt;p:column id="colRuleId" headerText="Id" &gt;
          &lt;h:outputText value="#{item.id}" /&gt;
      &lt;/p:column&gt;
      &lt;p:column id="colRuleCode" headerText="Code"&gt;
          &lt;p:cellEditor&gt;
              &lt;f:facet name="output"&gt;
                  &lt;h:outputText value="#{item.code}" /&gt;
              &lt;/f:facet&gt;
              &lt;f:facet name="input"&gt;
                  &lt;p:inputText id="inRuleCode" value="#{item.code}" onblur="hideValidatorMsg(); validateRule(#{rowIndex});" /&gt;
              &lt;/f:facet&gt;
          &lt;/p:cellEditor&gt;
      &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>function validateRule(rowIdx) {
      var namespace = 'view' + $('[id$=hidNamespace]').val();
  
      $('#' + namespace + '\\:form1').jqxValidator({
          animation : 'none',
          scroll : false,
          arrow : false,
          rules : [ {
              input : '#' + namespace + '\\:form1\\:tabView\\:tblRule\\:' + rowIdx + '\\:inRuleCode',
              message : 'Required field!',
              action : 'blur',
              position : 'top',
              rule : 'required'
          } ]
      });
  
      if ($('#' + namespace + '\\:form1').jqxValidator('validateInput', '#' + namespace + '\\:form1\\:tabView\\:tblRule\\:' + rowIdx + '\\:inRuleCode') === false) {
          return false;
      } else {
          return true;
      }
  }
  </code></pre>