2 Replies Latest reply on Feb 25, 2010 3:33 PM by Nick Belaevski

    counter in the first column of an extendedDataTable

    Chuck Bronberg Newbie

      Hello,

       

      What I thought it would be as easier as with JSP's varStatus is costing me hours...

       

      As said in the title I need a counter in the first column of an extendedDataTable: first row 1, second 2 and so on.

       

      I tried using rowKeyVar, but what that's showing is the database table row primary key. Probably because I am modifying the extendedDataTable?

       

      This is the table:

       

        <rich:extendedDataTable value="#{outagesXtndTbl.outagesDataModel}" var="out" id="bc_table" width="560px"
         height="400px" sortMode="#{outagesXtndTbl.sortMode}" selectionMode="#{outagesXtndTbl.selectionMode}"
         tableState="#{outagesXtndTbl.tableState}" selection="#{outagesXtndTbl.selection}"
         binding="#{outagesXtndTbl.uidata}" rowKeyVar="rkvar">

       

      if I use the rowKeyVar like

       

         <rich:column sortable="false" label="" id="ys" width="40px">
          <h:outputText value="#{rkvar + 1}" id="bc_index" title="Row Number"/>
         </rich:column>

       

      then I can see there the database table row ID, which in this case is something like 1243, 1246, 1267, etc.

       

      Any other way to generate a simple count in the first column?

       

      Thanks!