[Zope] Custom Property Sheet Look

Kevin Dangoor kid@kendermedia.com
Mon, 17 Jan 2000 14:48:53 -0500


It's generally a pretty straightforward thing. It's also necessary to make
your own property sheet forms when you're using a CatalogAware ZClass. For
an example, you can look at KM|Net News and look at the KMArticle ZClass.
Specifically, the edit and postit methods are the ones that do this.

    In a nutshell, you make a method that displays the form. Make sure that
you set the form data types properly. If you have an integer property, the
name of that form input should be "myval:int". Zope will then convert myval
to an int automatically and you won't get nasty type errors. Make the form
post to another method.

    Assuming your form inputs have names that match up precisely with names
on your propertysheet, you can just do:

<dtml-call
"propertysheets.YourPropertySheet.manage_editProperties(REQUEST)">
<dtml-call reindex_object>  <!-- do this if it is CatalogAware -->

Other than any niceties you want to display (like Changes Saved), that's all
you need in the method that saves the changes.

Kevin

----- Original Message -----
From: "James W. Howe" <jwh@allencreek.com>
To: <zope@zope.org>
Sent: Monday, January 17, 2000 1:39 PM
Subject: [Zope] Custom Property Sheet Look


> I've been playing around a little bit with ZClasses.  I've created a
ZClass
> with a small number of properties.  When I create an instance of my ZClass
> I can edit properties via a standard property editing page.  If I don't
> like the look of this page, how easy is it to develop a custom property
> page for my ZClass?  What and where would I need to make changes?