[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1306) EntityQuery: last page is empty for even number of results
H T (JIRA)
jira-events at lists.jboss.org
Thu May 17 18:45:52 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1306?page=comments#action_12362473 ]
H T commented on JBSEAM-1306:
-----------------------------
Currently I have these to help fix this problem:
@Transactional
public long getLastFirstResult() {
if (getResultCount() % getMaxResults() == 0) {
return getResultCount() - getMaxResults();
}
return (long) Math.floor(getResultCount() / getMaxResults()) * getMaxResults();
}
@Override
public boolean isNextExists() {
return getResultList() != null &&
(getFirstResult() == null ? 0 : getFirstResult() + getMaxResults()) < getResultCount();
}
> EntityQuery: last page is empty for even number of results
> ----------------------------------------------------------
>
> Key: JBSEAM-1306
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1306
> Project: JBoss Seam
> Issue Type: Bug
> Components: Framework
> Affects Versions: 1.3.0.BETA1
> Environment: JBoss 4.2CR2
> Latest CVS Build (as of May 8, 2007)
> Reporter: H T
>
> In the Contact List example, add another contact entry into import.sql to make 4. Modify "max-results" in components.xml to 2.
> When you click on last page, it shows an empty page.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list