i try to get the multiple selected Datable to work, but until now i have failed.
First of all I am not sure if there isn't a bug in the showcase:
Code: Select all
public void setSelectedCar(Car[] selectedCars) {
this.selectedCar = selectedCars;
}
I try to manage to send 2 variables to a method of a controller, one of them works fine, the second is the array/list (tried both) of the selected items from the datatable and it is always null.
Code: Select all
<p:dataTable var="participant" value="#{schulungView.getSchulung().getParticipants()}"
selection="#{schulungView.participatedParticipants}" selectionMode="multiple">
<p:column>
<h:outputText value="#{participant.firstname}" />
</p:column>
<p:column>
<h:outputText value="#{participant.lastname}" />
</p:column>
<f:facet name="footer">
<p:commandButton value="PDF" action="#{pDF.generateCertificates(participatedParticipants, schulung)}"/>
</f:facet>
</p:dataTable>>