I am using jboss 5, seam 2.2.0 and primefaces 1.0.2.
I am trying to use the db paging functionality of the DataTable.
The table is coming up nicely but the previous and next links are disabled.
It always says "0 of 0"
My page is as follows
Code: Select all
<p:dataTable var="objectVar" value="#{crudLazyDataModel}" paginator="true" rows="3" dynamic="true" lazy="true"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
<p:column resizable="true">
<f:facet name="header">
<h:outputText value="Ahem" />
</f:facet>
<h:outputText value="#{objectVar.name}" />
</p:column>
</p:dataTable>
Code: Select all
@Override
public List<AbstractEntityInterface> fetchLazyData(int first, int pageSize) {
List resultList = new ArrayList(100000);
resultList.addAll(entityManager.createQuery(constructHsql()).setFirstResult(first).setMaxResults(pageSize).getResultList());
return resultList;
}
Thanks
Pieter