[ZCM] [ZC] 214/ 5 Comment "Batch.py"

Collector: Zope Bugs and Patches ... zope-coders@zope.org
Tue, 12 Feb 2002 08:57:27 -0500


Issue #214 Update (Comment) "Batch.py"
 Status Accepted, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/214

==============================================================
= Comment - Entry #5 by ajung on Feb 12, 2002 8:57 am


________________________________________
= Accept - Entry #4 by ajung on Feb 12, 2002 8:57 am

 Status: Pending => Accepted

 Supporters added: ajung


________________________________________
= Resubmit - Entry #3 by mj on Feb 11, 2002 5:36 pm

 Status: Rejected => Pending

That is not the bug that is reported. The third batch points to 4 previous items and the beginning of the batch. Somehow the reporter confuses this with the orphan parameter, but the last batch size of 3 is not questioned.
________________________________________
= Reject - Entry #2 by ajung on Feb 11, 2002 4:06 pm

 Status: Pending => Rejected

This behaviour is triggered by the orphan parameter. When the
parameter is 3 than you will get 3 items on the last page.
setting orphan to 0 gives you 2 items and one item in the last
batch. please check the docs about 'orphan' details.

 - aj 
________________________________________
= Request - Entry #1 by Anonymous User on Feb 11, 2002 4:00 pm

The sequence i'm browsing consist of 11 items. I use a 'size' of 2, that is, showing 2 items per page. Below you find the content of the pages: 

PAGE 1: 
item 1
item 2
<next 2 results>

PAGE 2:
item 3
item 4
<previous 2 results> <next 2 results>

PAGE 3:
item 5
item 6
<previous 4 results> <next 2 results>

PAGE 4:
item 7
item 8
<previous 2 results> <next 3 results>

PAGE 5:
item 9
item 10
item 11
<previous 2 results>


On page 3 <previous 4!! results> appears. In my opinion this should be <previous 2 results>. 
The link <previous 4 results> point to URL http://localhost:8080/.../SearchResults?start:int=0

For debugging purposes i added 
<span tal:condition="previous"                      tal:content="python:batch.previous.orphan"></span>
to page template. From page 2 on 'orphan' appears to be 3.

My question is: where is 'orphan' set to this value ? 

Hopefully the above explains my problem. 

 
==============================================================