I have the option to select PrimeFaces 3.4.1 datatable:
<p:dataTable value="#{projectAdminisrationMB.selectedUserMemberOfGroups}" var="group1" rowKey="#{group1.name}" selectionMode="single" selection="#{projectAdminisrationMB.selectedBelongToGroup}"> ... </p:dataTable>
I get this error:
com.sun.faces.context.PartialViewContextImpl $ PhaseAwareVisitCallback Grave visit: javax.faces.FacesException: DataModel must implement org.primefaces.model.SelectableDataModel when the option is enabled.
But I already set rowKeyaccording to FacesException: DataModel should implement org.primefaces.model.SelectableDataModel when the selection is on . How is this caused and how can I solve it?
rowKey
, EL rowKey - null.
null
, name Group null. , DB, #{group1.id} — .
name
Group
#{group1.id}
FYI - Primefaces. , , . , , . , , , , , , . , , . rowKey.