JSF DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled

Error: DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled.

jsf-datamodel-must-implement-org-primefaces-model-selectabledatamodel-when-selection-is-enabled

Solución:

just add this attribute rowKey to the datatable tag :

<p:dataTable border="1" value="#{projectAdminisrationMB.projectNoUsersList}"
var="userObj"
rowKey="#{userObj.name}"selection="#{projectAdminisrationMB.selectedUsers}"
selectionMode="multiple" rowIndexVar="rowIndex"
binding="#{table2}">
post-author