[Zope-DB] How can I dynamically generate a Z Search Interface?

Dieter Maurer dieter@handshake.de
Sun, 1 Sep 2002 23:00:11 +0200

Tena Sakai writes:
 >       > I am not sure, what you want precisely:
 > I think you know what I want, but let me be precise.
 > I have a page that has a form.  The form is made of a
 > bunch of checkboxes and next to each box there is a
 > mentioning of a column name of a table.  A user checks
 > or unchecks each box to his/her liking and presses the
 > submit button.  The submit button invokes an action
 > (a dtml method I wrote) which outputs a SQL statement
 > (something like SELECT FOO, MAN, CHU FROM MYTABLE).
Apparently, you do not want to create a Z SQL Method
inside the ZODB but at most a temporary one.
Then, Z Search Interface cannot use it.

But, it is not necessary.

  You can use a single report that presents all of your

  The key is the "names" method of Z SQL Method results.
  It returns the sequence of column names in the result sequence.
  You use a 2 level loop, to make your report DTML object.