[Zope3-dev] Finding context in a vocabulary
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Sep 30 08:40:11 EDT 2004
On Thursday 30 September 2004 01:00, Peter Mayne wrote:
> I've tried two different methods: using a Choice field (as in chapter 31
> of the book), and an Object field with a custom widget (chapter 15). Is
> there any aesthetic reason for preferring one over the other? I
> initially thought of the Object field because of the schema attribute
> restriction.
Use the Choice field and a vocabulary. The Choice field's constraint is much
stronger, since you are guaranteed to only get terms the vocabulary produces.
Also, you save a lot of work, since all the widgets already exist.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list