JSF 2 dataTable row index without dataModel

前端 未结 1 1444
一个人的身影
一个人的身影 2020-12-03 08:47

I\'ve been using ui:repeat to generate tables. With ui:repeat it\'s easy to get the rows numbered using the varStatus. I\'m depending on the row id\'s from varS

1条回答
  •  执念已碎
    2020-12-03 09:18

    Just bind the table to the view itself instead of to a bean.

    
    

    Then you can use #{table.rowIndex} where necessary. E.g.

    #{table.rowIndex + 1}
    

    0 讨论(0)
提交回复
热议问题