[Zope3-dev] Schema fields, widgets, allowable_values and items

Martijn Faassen faassen@vet.uu.nl
Tue, 5 Nov 2002 11:28:42 +0100


Hi there,

For those of you gripped in suspense, me and Jim and Christian Theune
discussed this on IRC yesterday, and I think the conclusion is that
allowed_values on the field will be about values only; label information
is not in there. Widgets that want to display labels will have the
responsibility to find those themselves. This adds flexibility as
sometimes we may not need any labels, sometimes the labels will be text,
and sometimes the labels might even be images. How the mapping from
value to label takes place is entirely the responsibility of the widget
and can do whatever is necessary; in some cases it could store a 
dictionary of mappings itself, but in other cases it may look it up in
some other part of the database.

We'll see how this works out; I can still imagine use cases where having
the value and label together is handy, for instance if you want to display
a two column relational table directly into a drop down box. I have no
clear view how this would be accomplished in the new system. Hm, we also
talked about some widget which would look up both entirely independent
from the underlying field, right? That would make it easier again..

Regards,

Martijn