[Zope-DB] Re: Form evaluation in ZSQL-Method

Dieter Maurer dieter at handshake.de
Mon Sep 22 13:57:17 EDT 2003

Andreas Tille wrote at 2003-9-22 14:56 +0200:
 > ...
 > Using "Z Search Interface" I've got the both page templates I appended to the
 > end of this mail (they are completely unchanged).
 > If I call the search.html form with an integer not equal to 0 all is as expected.
 > If I use 0 as iditem I get the first 20 items and if I follow "next 10 results"
 > I get exactly the same error I reported from my more complex application:
 >    Zope Error
 >    Zope has encountered an error while publishing this resource.
 >    Error Type: NameError
 >    Error Value: global name 'iditem' is not defined
 > ...
 > Anybody able to reproduce or rather to fix this problem?

It will be easily reproducible...

It seems extremely difficult to include the search in the generated
links. Even the Zope core contains bugs in this respect at
two places.

 > ...
 >            tal:attributes="href string:${request/URL0}?start:int=${previous/first}"

As you can easily see, this (and the next) link does not include
the query parameters.

The "ZTUtils" package contains a method "make_query" that allows you
to fix this bug.

Currently, I do not have time to provide the code.
Come back, when you need more help.


More information about the Zope-DB mailing list