[Zope-DB] How can I dynamically generate a Z Search Interface?
Fri, 30 Aug 2002 16:57:11 -0700
Thanks for your response, but I am far from getting it.
> 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).
I want to programmatically generate a Z Search Interface
based on this FOO MAN CHU thing. In other words, I
want to execute this query and return the table to the
> You create Z SQL Methods dynamically and want Z
> Search Interfaces for them, right?
> This is easy, when the Z SQL Methods are created
> as persistent objects inside the ZODB.
I have no idea what "persistent object" really means.
At the moment, I can output to the browser the query
strings, the SQL statement(s). Does this qualify as
persistent object? I feel safe to say that the dtml
that generates SQL statement(s) is a persistent object.
> Then, my standard hint applies: whatever you can
> do via the ZMI, you can do programmatically. Look
> at the relevant ZMI source and learn how it does
> its task...
I am afraid I have no luxury of looking at the source
at this time and your hint is a bit too faint for me.
> Search the mailing list archives for "ZMI" and
> "programmatically" to learn more.
I have just done that, but nothing tangible comes to
mind. Please tell me mechanism/frame work I must use.
Do I (with the query variables (such as column names
and table name)) call some method from dtml level? Or
do I use external method? Or is there something not
even on my horizon?
Thanks in advance.
<dieter@handshake To: "Tena Sakai" <email@example.com>
.de> cc: firstname.lastname@example.org
Sent by: Subject: Re: [Zope-DB] How can I dynamically generate a Z Search
Tena Sakai writes:
> So far what I have been doing is to generate Z Search Interface
> statically. Ie., I have some Z SQL method, which typically looks
> select *
> from mytable
> and then I manually "add" Z Search Interface based on this Z SQL
> method. I use resultant dtml method in the way I want. It works
> quite well.
> But now I want to do this dynamically.
I am not sure, what you want precisely:
You create Z SQL Methods dynamically and want Z Search Interfaces
for them, right?
This is easy, when the Z SQL Methods are created as persistent
objects inside the ZODB.
Then, my standard hint applies: whatever you can do via
the ZMI, you can do programmatically. Look at the relevant
ZMI source and learn how it does its task...
Search the mailing list archives for "ZMI" and "programmatically"
to learn more.
Zope-DB mailing list