简体   繁体   English

如何获取primefaces数据列表中的索引?

[英]How to get the index in a primefaces dataList?

some one can tell me pliz how can i get index (i) datalist ?有人可以告诉我PLIZ我怎样才能获得索引(i) datalist

ex : Bean.myList.get(i) for putting it into a slide like :例如: Bean.myList.get(i)用于将其放入幻灯片中,例如:

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

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.在文档中,您会发现可以将rowIndexVar属性与 DataLists 一起使用。 It reads:它写道:

Name of the iterator to refer each row index.引用每个行索引的迭代器的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM