[Zope] how-to: dynamically create a list for the Value of a zClass multiple-selection Type?

Trevor Toenjes zope@toenjes.com
Sun, 16 Sep 2001 01:04:52 -0400


Or put another way!
how-to: make the Value of a zClass multiple-selection Type property call the
ID's of other zClasses in a Folder.
i searched the boards and zope.org, but couldnt find references to using
multiple-selection in zClasses.

specifically:
What is the syntax for the Value of a multiple-selection Type?
-to build from the instances of a different zClass

The DTML below generates the list I need, but what is the syntax that makes
sense to Value in zClasses?  is this DTML generating the right type of list?

###the_list  DTMLMethod
<dtml-with folder_of_anotherZClasses>
<dtml-in expr="objectValues('anotherZClass')">
  <dtml-var "id">
</dtml-in>
</dtml-with>

When I instantiate myzClass, one of the myzClass properties is a
multiple-selection list of all the instances of 'anotherZClass', in a
specified folder.  I want the 'id' because a method of myzClass is to create
hotlinks to related 'anotherZClass'.

Thanks again for the support,
-Trevor