[Zope] Zclasses derived from ZCatalog

Tom Schwaller tom.schwaller@linux-magazin.de
Tue, 02 Nov 1999 16:00:02 +0000


hi all,

http://www.zope.org/Members/Zen/tips/tip_ZCatalogInZClass

shows nicely how to add a ZCatalog in a ContainerClass.
How does one implement the same functionality
when deriving a class A from ZCatalog:

A(ZCatalog) -- B(CatalogAware)

How to modify
<dtml-with "Catalog">
<dtml-call "manage_addColumn('area',REQUEST,RESPONSE,URL1)"> ?

<dtml-with _catalog>
will not work. Then I'd like to add B-Objects,
which are CatalogAware, to the A-Catalog.

Right now I use only one instance of the A-class (Books)
and add the Books (type B) by writing:

<dtml-with "Book.createInObjectManager(REQUEST['id'], REQUEST)">
<dtml-call "propertysheets.buchdaten.manage_editProperties(REQUEST)">
<dtml-call unindex_object>
<dtml-call "manage_editCataloger('Books', REQUEST)"> 
<dtml-call reindex_object>
</dtml-with>

which is nonsense, but works for one Book-Folder with a defined name.

I like deriving from ZCatalog, so the users do not see
the Catalog (otherwise one could delete it) and the 
ContainerClass (Books) is the catalog of its members (Book).

Any hints?

-- 

Tom Schwaller
http://www.linux-magazin.de