hi :) I have a primefaces datatable with rows selction using checkbox , and i don't know how to get the selected rows numbers here is my datatable:
<p:dataTable id="tabJob" var="contenuJob" value="#{templateBean.contenuJob}" selection="#{templateBean.selectedRows}" rowKey="#{templateBean.idJob}" paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15" >
<f:facet name="header">
Selectionner les lignes
</f:facet>
<p:column selectionMode="multiple" style="width:16px;text-align:center"/>
<p:columns value="#{templateBean.colonnes}" var="colonnes" columnIndexVar="ind" sortBy="#{templtaBean.colonnes}">
<f:facet name="header">
<h:outputText value="#{colonnes}"/>
</f:facet>#{contenuJob[ind]}
</p:columns>
</p:dataTable>
<p:commandButton id="valider" value="valider" action="#{templateBean.valider}" />
can someone help me please ? do i have to use ajax events or what ?
Aucun commentaire:
Enregistrer un commentaire