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=32113>. 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=32113 AbstractSearchTool slip calculation is wrong. ------- Additional Comments From [EMAIL PROTECTED] 2004-11-10 23:10 ------- ## Unless I'm misunderstanding the usage... The "total pages + 1" will not appear unless the fix for the slip size is applied. Sorry about that, I was mixing up the issues when I was making the fix. Here are the tests I did: http://sylow.no-ip.com/maven/site/ShinobuDemo/xref- test/org/ieee/shinobu/demo/velocity/AbstractSearchToolTest.html In each test, #executeQuery() will return 5 items (1 ~ 5). The tool is set up to have slipSize = 3, and the template to show the slips, with the current page in square brackets. eg. If index = 2(item #3), 2 [3] 4. I think the first three tests shows what I'm trying to get here. Test #1: itemsPerPage = 1, index = 0 I expect [1] 2 3 I got [1] 2 Test #2: itemsPerPage = 1, index = 2 I expect 2 [3] 4 I got 2 [3] Test #3: itemsPerPage = 1, index = 4 I expect 3 4 [5] I got 4 [5] After applying the slip size fix, I got the following results: Test #1: itemsPerPage = 1, index = 0 I expect [1] 2 3 I got [1] 2 3 Fixed. Test #2: itemsPerPage = 1, index = 2 I expect 2 [3] 4 I got 2 [3] 4 Fixed. Test #3: itemsPerPage = 1, index = 4 I expect 3 4 [5] I got 4 [5] 6 Here, a nonexisting "6" appears. Just in case, here's the template: #foreach( $index in $search.slip ) #if( $index == $search.index ) [$search.pageNumber] #else $search.getPageNumber($index) #end #end --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
