Batching raises "Bad Request" (was: [Zope] (no subject))
Dieter Maurer
dieter@handshake.de
Thu, 20 Sep 2001 22:07:34 +0200 (CEST)
Aruna Prabhakaran writes:
I think I already asked you to provide a subject for your posts...?
> I have this situation where in I have an SQL method to retrieve records.
>
> GetCountryMethod(Country,State)
> Country and State are the two parameters being passed to the SQL method
>
> I am trying to display them five at a time on a page.But right now after
> displaying 5 records it throws up Bad Request and displays the two parameter
> names that i had passed to the method.
>
> I understand its because these variables need to "submitted" to the same
> page again and again for every cycle of display.I used hidden variables but
> it displays the same 5 records retrieved first time and shows them again and
You understand correctly!
You should use "dtml-in" build in batch support.
Quite well explained in
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
(I think).
"dtml-in" defines the variable "sequence-query" which usually
provides all query parameters with the exception of the
parameter defining the starting index. You use this
parameter in addition to control where the next/previous
batch should start.
"sequence-query" only works for GET requests, not for "POST"
requests. But, probably, you will be able to use GET requests.
Dieter