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