cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32728] New: - SearchGenerator return has-previous false when meet the no. 2 page
Date Thu, 16 Dec 2004 08:01:23 GMT
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.

Mime
View raw message