Sheet how use rowIndex for rowKey

Community Driven Extensions Project
Post Reply
Posts: 39
Joined: 07 Oct 2015, 12:08

28 Jul 2018, 18:58

version 6.2.7
I would like use rowIndex from data list object for rowKey property. In ajax change, I would like to use it to get(sheetUpdate.getRowKey()) directly by index.
I try

Code: Select all

<pe:sheet var="myList" value="#{myBean.myList}" rowKey="#{myList.rowIndex}" .....
==> javax.el.PropertyNotFoundException

Code: Select all

<pe:sheet var="myList" value="#{myBean.myList}" rowKey="#{mybean.myList.rowIndex}" .....
==> java.lang.NumberFormatException: For input string: "rowIndex"

Workarround, I search data on the list by use :

Code: Select all

Any better solution or is it a sheet issues for use rowKey ?
Last edited by bug007 on 31 Jul 2018, 11:06, edited 2 times in total.

Posts: 1888
Joined: 22 Apr 2013, 15:48

30 Jul 2018, 18:31

the rowKey is supposed to be in the unique identifier in the POJO representing that row. Using rowIndex does not feel like a good solution to whatever problem you are trying to solve.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile:
PrimeFaces Elite 8.0.1 / PF Extensions 8.0.2

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest