[Zope] Selection Property for ZClasses

Shalabh Chaturvedi shalabh@pspl.co.in
Wed, 10 May 2000 15:30:19 +0530


RC Compaan wrote:

> I created a ZClass with a property "selection" and specified "mylist" as
> value.  In the root of my site i have a dtml method called "mylist" to
> generate a list.  When I add my new ZClass and try to modify property values
> i get an error: " InError, String not allowed as input for in".
>
> the dtml-method mylist:
>   <dtml-with Folder>
>     <dtml-in "objectItems('MyZClassMetaType')">
>       <dtml-var sequence-item>
>     </dtml-in>
>   </dtml-with>

The method called mylist should return a list. You could try to do something
like the following in mylist (untested, and I'm guessing what you really want
to do):

 <dtml-return "objectIds('MyZClassMetaType')">

The method you have returns a string as there is no <dtml-return> tag and so
the method will return whatever 'text' it evaluates to.

Hope this helps,
Shalabh