Hi Jean

The value for a selection list can be any zope object that returns a list
eg. MyDocClass can have a property "Format" with a value "FormatList", where
FormatList is a dtml-method that returns a list.

1.Go to the property sheet for your new class and add the property Format
with value FormatList.
2.Go to the Folder where you want to add an instance of your ZClass and
create add a property "docformats" of type "lines" and enter the initial
3.In the Folder where you want to add your instance, create a dtml-method
called "FormatList" that will return the list, containing:
        <dtml-return docformats>

Hope this helps.

For more info on selection list see


> -----Original Message-----
> From: Jean Jordaan [mailto:[EMAIL PROTECTED]]
> Sent: 04 August 2000 07:10
> Cc: RC Compaan (E-mail)
> Subject: How to prime a selection?
> Hi all
> I'm making a document class for a warehouse of papers.
> It's based on ZCatalogAware and ObjectManager (to wrap
> mainly PDFs and DOCs), and has fields:
>   title   (string type)
>   origin  (string type)
>   format  No value for format_value.
>   type    No value for type_value.
> "format" and "type" are selections --
> 1. where do I supply their initial values (filling in
>    'format_value' and 'type_value')?
> 2. is it possible to let a field offer presets and
>    previously entered values, but to allow users to
>    add new ones, which are remembered and offered to
>    subsequent users?
> A RTFM-type answer to question 1. is perfectly OK, though a
> page reference would be sorely appreciated.
> --
> jean

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

Reply via email to