[Zope] ZCatalog, ZClass

Markus Hochreiter Markus Hochreiter" <mh@pernau.at
Sat, 6 May 2000 11:49:38 +0200


Hi,
I have a problem with the zCatalog! I have created a APerson product with a
ZClass (CatalogAware as base Class).
Below are the Form and the Methode to insert a Instance procrammatically.
After adding a Aperson, I get no result when I'm searching(with a normal
ZSearch Interface) in the Catalog!
So my question:
Is there anything wrong in my methods,
or is this a problem from zope,
or are there parameters in zope which I have to set up?

thanks for your help
mex

Form:
<H2>Add APerson</H2>
<form action="adressbuch_add_processor">
<table>

<tr><th>Vorname</th>
    <td><input type=text name=name></td>
</tr><tr><th>Nachname</th>
    <td><input type=text name=nname></td>
</tr><tr><th>Email</th>
    <td><input type=text name=email></td>
</tr><tr><th>TelephonNr</th>
    <td><input type=text name=phone></td>
</tr><tr><td></td><td><input type=submit value=" Add "></td></tr>
</table></form>


Add methode:
<dtml-call "REQUEST.set('name',name)">
<dtml-call "REQUEST.set('nname',nname)">
<dtml-call "REQUEST.set('email',email)">
<dtml-call "REQUEST.set('phone',phone)">
<dtml-with "manage_addProduct['APerson']">
<dtml-call "APerson_add(_.None, _, NoRedir=1)">
</dtml-with>
Thanks!


APerson_add Methode:
<dtml-call "REQUEST.set('ts', ZopeTime())">
<dtml-call "REQUEST.set('id', _.str(_.int(ts)))">
<dtml-with "APerson.createInObjectManager(REQUEST['id'], REQUEST)">
    <dtml-call "propertysheets.Properties.manage_editProperties(REQUEST)">
    <dtml-call reindex_object>
</dtml-with>

<dtml-if NoRedir>
    <dtml-else>
        <dtml-if DestinationURL>
            <dtml-call
"RESPONSE.redirect(DestinationURL+'/manage_workspace')">
        <dtml-else>
            <dtml-call "RESPONSE.redirect(URL2+'/manage_workspace')">
    </dtml-if>
</dtml-if>