title: using getRowIndex in scriplet
body: <p>I'm trying to get the row index of a JSF data table in a scriplet.</p>
  
  <p>With a JSF component, it works like a charm:</p>
  
  <pre><code>&lt;h:outputText value="#{Operations.postsDataTable.rowIndex}" /&gt; 
  </code></pre>
  
  <p>But when I use a scriptlet like this:</p>
  
  <pre><code>&lt;% out.println(Operations.getPostsDataTable().getRowIndex()); %&gt;
  </code></pre>
  
  <p>Then it will print <code>-1</code> for each row. What am I doing wrong?</p>