You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/12/16 09:01:23 UTC

DO NOT REPLY [Bug 32728] New: - SearchGenerator return has-previous false when meet the no. 2 page

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32728>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32728

           Summary: SearchGenerator return has-previous false when meet the
                    no. 2 page
           Product: Cocoon 2
           Version: 2.1.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: blocks
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: roy_huang@nbmgroup.com


Using SearchGenerator,when come to page 2,has-previous is false,but after page 
2 it return true.The problem is cause by LuceneCocoonPager.java,method 
hasPrevious(),line 189:
return hitsIndex > countOfHitsPerPage;
Because index start with 0,the second page is 10 when 10/page,then 10>10 is 
false.
Solution:
change to  return hitsIndex >= countOfHitsPerPage
or make index start with 1,this is the better solution.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.