On Mon, 10 Sep 2001 09:40:46 -0700, [EMAIL PROTECTED] wrote:

>def manage_addAdItem(self, id, title, REQUEST=None):
> """Zope managment interface create method for AdItem"""
> ad=AdItem(id)
I assume the __init__ of AdItem that sets the default values that you

> ad.setId(id)
> ad.setTitle(title)
> if REQUEST is not None:
>   ad.setAdBody(REQUEST['adBody'])
>   if (len(REQUEST['keywords']) > 0):
>     ad.setKeys(REQUEST['keywords'])
>   ad.setAdDateMulti(yyyy=REQUEST['Adyyyy'], mm=REQUEST['Admm'],
>   ad.setRtDateMulti(yyyy=REQUEST['Rtyyyy'], mm=REQUEST['Rtmm'],
>   ad.featureURL=REQUEST['featureURL']
You overwrite all the defaults with the real values... .good.

> self._setObject(id, ad)
You add the new object to the folder. The folder calls
ad.manage_afterAdd (or whatever its called), which in the case of
CatalogAware calls index_object.

Everything looks right to me. The catalog should contain the real

Toby Dickenson

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to