Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. <p:dataTable id="tabJob" var="contenuJob" value="#{templateBean.contenuJob}" selection="#{templateBean.selectedRows}"
  2. rowKey="#{templateBean.idJob}" style="margin-bottom:0"
  3. scrollable="true" scrollHeight="250" rowIndexVar="rowIndex" >
  4.  
  5. <p:column selectionMode="multiple" style="width:16px;text-align:center" />
  6. <f:facet name="header">
  7. selectionner les colonnes
  8. </f:facet>
  9.  
  10. <p:column headerText="#" style="width:3%"> #{rowIndex+1}</p:column>
  11. <p:columns value="#{templateBean.colonnes}" var="colonnes" columnIndexVar="ind" id="col#{ind}">
  12. <f:facet name="header">
  13. <h:outputText value="#{colonnes}"/>
  14. </f:facet>#{contenuJob[ind]}
  15. </p:columns>
  16.  
  17. <f:facet name="footer">
  18. <p:commandButton process="tabJob" value="valider" action="#{templateBean.validerSelection()}"/>
  19. </f:facet>
  20.  
  21. </p:dataTable>
  22.  
  23. private ArrayList<String> contenuJob,selectedRows;
  24. .................
  25. public String validerSelection(){
  26.  
  27.  
  28. System.out.println("size de selectedRows ::"+selectedRows.size());
  29.  
  30. return null;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement