Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p:dataTable id="tabJob" var="contenuJob" value="#{templateBean.contenuJob}" selection="#{templateBean.selectedRows}"
- rowKey="#{templateBean.idJob}" style="margin-bottom:0"
- scrollable="true" scrollHeight="250" rowIndexVar="rowIndex" >
- <p:column selectionMode="multiple" style="width:16px;text-align:center" />
- <f:facet name="header">
- selectionner les colonnes
- </f:facet>
- <p:column headerText="#" style="width:3%"> #{rowIndex+1}</p:column>
- <p:columns value="#{templateBean.colonnes}" var="colonnes" columnIndexVar="ind" id="col#{ind}">
- <f:facet name="header">
- <h:outputText value="#{colonnes}"/>
- </f:facet>#{contenuJob[ind]}
- </p:columns>
- <f:facet name="footer">
- <p:commandButton process="tabJob" value="valider" action="#{templateBean.validerSelection()}"/>
- </f:facet>
- </p:dataTable>
- private ArrayList<String> contenuJob,selectedRows;
- .................
- public String validerSelection(){
- System.out.println("size de selectedRows ::"+selectedRows.size());
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement