[Zope] ZCatalog, ZClass
Jason Spisak
444@hiretechs.com
Mon, 08 May 2000 15:29:13 GMT
Markus Hochreiter:
> Hi,
Howdy.
> I have a problem with the zCatalog! I have created a APerson product with a
> ZClass (CatalogAware as base Class).
Is it the first base class? Nothing can be before it, not even Object
Manager.
> 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>
>
>
Try it without the <dtml-if NoRedir> at the end. A while back I reported a
bug with if's on the same page as reindex_object.
All my best,
Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.