title: Row numbering with p:dataTable
body: <p>I have this query:</p>
  
  <pre><code>SELECT @rownum:=@rownum+1 'no', m.title, m.author, REPLACE(SUBSTRING_INDEX(m.content, ' ', 20), '&lt;br&gt;', ' '), m.viewed, m.hashid FROM book m, (SELECT @rownum:=0) r WHERE m.lang = ?1 AND m.title like CONCAT('%',?2,'%') ORDER BY m.title asc
  </code></pre>
  
  <p>The <code>@rownum:=@rownum+1</code> part of the MySQL query for result numbering as Primefaces currently does not have a facility to display a numbering column.</p>
  
  <p>Is there a way to show Primefaces column numbering without having to do <code>@rownum:=@rownum+1</code>?</p>
  
  <p>If not, can I construct the above query using purely the CriteriaBuilder method?</p>