I quote the PrimeFaces reference:
RowKey must be a unique identifier from your data model and be used with datatable to find the selected rows. You can define this key using the rowKey attribute or by binding a data model that implements org.primefaces.model.SelectableDataModel.
So, if your datatable is given by a set of beans, rowKey should be an attribute that uniquely represents this bean. For example, primaryKey
source share