Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How do you get row numbers to show in a <h:dataTable>?
  2. <h:dataTable border="1" var="f2" value="#{someEJB.list}">
  3.     <h:column>
  4.         <f:facet name="header">No</f:facet>
  5.     </h:column>
  6.     <h:column>
  7.         <f:facet name="header">Name</f:facet>#{f2.name}
  8.     </h:column>
  9. </h:dataTable>
  10.        
  11. <h:dataTable binding="#{table}" ...>
  12.     <h:column>
  13.         #{table.rowIndex + 1}
  14.     </h:column>
  15. </h:dataTable>