[Zope3-dev] Proposal: Vocabulary Fields
Fred L. Drake, Jr.
fdrake@acm.org
Mon, 28 Apr 2003 15:32:09 -0400
I've posted a new proposal in the Zope 3 wiki:
http://dev.zope.org/Zope3/VocabularyFields
>From the proposal:
Zope schema provide support for an "Enumerated" flavor of many basic
types. The Enumerated fields provide a way to specify a field which
may have any value or, more interestingly, one from a list of
possible values hard-coded in the schema.
Vocabulary fields provide a conceptually similar field type for
situations in which the set of options may be highly dynamic or
otherwise by decoupled from the schema definition itself. A
vocabulary may be provided by some object in the ZODB, a query to an
external database, the contents of a file maintained by another
process, or static data provided by a separately maintained piece of
code.
A vocabulary field in a schema contains either a vocabulary object
(IAbstractVocabulary) or a name of a vocabulary. If a name is used,
the specific vocabulary to use will be supplied by a registry when
the schema field is bound to an instance of a content object.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation