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

Martijn Faassen faassen@vet.uu.nl
Sun, 3 Nov 2002 20:55:58 +0100


Jim Fulton wrote:
[snip]
> I have a couple of options.  I could changes the widgets to use 
> allowed_values,
> but then they won't have separate labels. This will only affect the 
> cache-selection
> views for cachable objects at this point. These use a custom widget that 
> could
> get the labels it wants from the cache service.
> 
> I think I'll go ahead and change the widgets to use allowed_values for now.
> 
> Alternatively, we could extend allowed_values or add another field 
> attribute to
> store labels^H^H^H^H^H^Htitles.

I think there are two cases. One is where the titles/labels are part of
the field metadata. Another is where the allowed_values and their
titles (and even descriptions, etc) come from some content source. I imagine
you could solve the latter by using a custom widget responsible for
displaying the labels, though in some cases there may be some trouble
hooking up the labels to the values. Conceivably a third case is that
this is a responsibility solely of the widget, though ordinary 
field titles aren't and these titles would seem to describe the content
just as much as they do.

I don't understand what you mean by it only affecting the cache selection
views for cachable objects at this point. Is this it the only code
that uses selection lists right now?

Regards,

Martijn