Reputation: 2409
I have a datatable:
<p:dataTable style="width: 100%;" id="dTable" var="tt" value="#{backingBean.memberList}" paginator="true" rows="20" selection="#{backingBean.selectedMember}" selectionMode="single" onRowSelectUpdate="mf:tabcontent" onRowSelectComplete="tvl();">
whose rows come selected when the page loads. Does anyone have any opinion about this issue? primefaces version is 2.2.1.
Thanks in advance.
Upvotes: 1
Views: 3832
Reputation: 1109655
That will happen if the array or collection behind selection="#{backingBean.selectedMember}"
is been prefilled with the selected rows. If you set it to null
or an empty array/collection, then nothing will be preselected.
Upvotes: 2