[Zope] howto format/customize property sheets for zclasses ?

Janko Hauser jhauser@ifm.uni-kiel.de
Mon, 6 Sep 1999 09:34:35 +0200 (CEST)


You don't need to make a product. It's quite easy to edit properties
from a custom form. You can use two document methods (DM) in your
ZClass for this.

The first is just a form for editing (edit DM which calls update DM):

<dtml-var standard_html_header>
<H2>Edit Info</H2>
<form action=update method=post>
<table>
<tr>
<td>Title</td>
<td><input type=text name=title size=40 value="<dtml-var title>"></td>
</tr>
<tr>
<td>Software Name</td>
<td><input type=text name=sw-name size=40
value="<dtml-var sw-name>"></td>
</tr>
...

(update DM)
<dtml-call "REQUEST.set('ts', ZopeTime())">
<dtml-call "REQUEST.set('modified-date', ts)">
<dtml-call "propertysheets.item_info.manage_changeProperties(REQUEST)">
<dtml-call "RESPONSE.redirect(URL2+'/view')">

In the REQUEST I create a new value to change the property
modified-date, this could probably done also with the let-tag. Than
all changed values from the edit form are in REQUEST. item_info is a
propertysheet in my ZClass.

I have learned a lot from the K!MnetNews package from Kevin Dangoor,
b.t.w. thanks Kevin :-)

HTH

__Janko