In order to get the row numbers of a datatable I got an answer here that I could bind the dataTable directly to the view (JSF 2 dataTable row index without dataModel).
I’m using that function in a composite component and there may be several of those in the same page. I believe that the binding makes it impossible to use more than one component on each page; is it possible to bind each table “separately” somehow?
Create a backing component class with an
UIDataproperty.And bind it to
#{cc.table}instead (the#{cc}refers the current backing component instance).