datatable: java.lang.ArithmeticException: / by zero

UI Components for JSF
Post Reply
jotremar
Posts: 5
Joined: 26 Jul 2011, 20:30

27 Jul 2011, 21:00

I have a datatable with lazy load and in cell edit.
When I try to edit a row and save it, I have this error:

java.lang.ArithmeticException: / by zero
at org.primefaces.model.LazyDataModel.setRowIndex(LazyDataModel.java:62)

I resolv it checking if PageSize is zero in load method from LazyDataModel, but this is not a good option, it must read this from datatable (rows property).

If I don't set rows property from datatable it have this error on load page (it have not a default value).

PF 2.2.1


smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

02 Dec 2011, 06:46

For others experiencing this error, I just provided a fix/workaround. See/click URL below and see my comment added:

http://code.google.com/p/primefaces/iss ... il?id=1544
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests