Hi,
I'm new to Primefaces and doesn't look like I'm off to a good start. I've installed the jars and put in a dataTable, which seems to work ok, until there's no rows. This seems to break the pagination, I've debugged it and it looks like it trys to divide by the amount of rows no matter what (if pagination is on) :
java.lang.ArithmeticException: / by zero
at org.primefaces.component.api.UIData.calculatePage(UIData.java:112)
at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:185)
at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:97)
Is this a known bug, am I missing something?
/ by zero in CalculatePage
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Can you post your p:dataTable code?
Also please read forum guide and state your environment. We don't know which version you are using.
Also please read forum guide and state your environment. We don't know which version you are using.
Sorry, I'm Mojarra 2.1.4, PF 3.0M4, the codes about as simple as it gets, loooks like this will happen with any configuration that returns 0 rows, I've tried it with the lazy model too :
Thanks for the lighting quick response btw.
Code: Select all
<p:dataTable value="#{ backingPage.mainTblCom.recordArray }" var="tableBean" paginator="true"
paginationAlwaysVisible="false"
rowsPerPageTemplate="5,10,15" >
<p:column style="width:35px;text-align:center">
<h:commandLink action="#{ backingPage.mainTblCom.selectBean }">
<span id="editImage" />
</h:commandLink>
</p:column>
<p:column>
<f:facet name="header">Short Postcode</f:facet>
#{tableBean.shortPostcodeStr}
</p:column>
<p:column width="24px">
<aplos:deleteBean rendered="#{tableBean.deletable}"></aplos:deleteBean>
</p:column>
</p:dataTable>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 37 guests