On Thu, Oct 27, 2005 at 10:23:52AM +0200, Dario Lopez-Kästen wrote:
> Not sure if this works, but that is the general idea. This was inspired from
> http://www.plope.com/Books/2_7Edition/AdvZPT.stx#2-9
> section: "Form Processing"

I would suggest to give it a try with a Z Search Interface.  See the
same book, in the chapter on Relational Databases:

This assists you in making two pages, at your choice as either DTML
Methods or Page Templates.  Like most people here I would suggest
going for the Page Templates.  One is a form in which you can enter
the values for your Z SQL Method.  This then passes control to the
second page, which is a report that gets its input by calling the Z
SQL Method.

The form basically is:

<form action="<id of your report page" method="get">
<input type="SUBMIT" name="SUBMIT" value="Submit Query">

The report basically starts with:

  <body tal:define="results  here/<id of your Z SQL Method>">

Note that when your Z SQL Method only has an update or insert or
delete it will usually not return a lot of results, so the report will
be basically empty.  I would say it is nice if the user gets some
feedback, so put some related select statement after your normal
query, even if it is just: SELECT * from your_table.  This gives the
report something to present to the user as visual feedback, instead of
leaving him in the dark on whether the submission of the form actually
had any permanent results.

Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
"It can seem like you're doing just fine,
but the creep's creeping into your mind." - Neal Morse

Attachment: signature.asc
Description: Digital signature

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to