Cesar
Cesar

Reputation: 83

How to get the index in a primefaces dataList?

some one can tell me pliz how can i get index (i) datalist?

ex : Bean.myList.get(i) for putting it into a slide like :

 <p:dataList value="#{Bean.myList}" var="objet">
    <slide :index="i" >

Upvotes: 0

Views: 829

Answers (1)

Jasper de Vries
Jasper de Vries

Reputation: 20273

I don't know what documentation you've checked, but please note that the showcase is not documentation. In the documentation you'll find that you can use the rowIndexVar attribute with DataLists. It reads:

Name of the iterator to refer each row index.

Upvotes: 4

Related Questions