Hi all!
I think I discovered a bug with the pagination logic of Query objects.
I have a query object comments defined in my components.xml. max-results param is set to 5 and I know that I have 10 comments in the DB. I can use the following code for the rendering of a "next page" link:
<s:link view="/comments.xhtml" rendered="#{comments.nextExists}" value="Next Page"> <f:param name="firstResult" value="#{comments.nextFirstResult}"/> </s:link>
public boolean isNextExists() { return getResultList()!=null && getResultList().size() == getMaxResults(); }