Sheet how use rowIndex for rowKey

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

28 Jul 2018, 18:58

Hi,
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
and

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

indexOf(sheetUpdate.getRowData())
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.

Melloware
Posts: 3716
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: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests