[Zope3-dev] widgets and ZCML (was widget question: propertyNames/getValue)

Garrett Smith garrett at mojave-corp.com
Thu Feb 19 14:52:59 EST 2004


Gary Poster wrote:
> I'd like to be able to explicitly override labels in zcml too.
> 
> <addform ...>
>    <widget class=".widgets.DualListWidget">
>      <label id="available_items" value="Available Vehicles" />
>      <label id="selected_items" value="Selected Vehicles" />
>    </widget>
> </addform>
> 
> This would let the zcml component of the message id extraction tool
> catch these sorts of changes.  Implementation-wise, my first take on
> this is to have a label dictionary as part of the widget
> interface...and this would also mean that every widget would have to
> get display text from this dictionary in order to play nicely. 
> Garrett, do you have any concerns?  Is this something you're already
> beginning to address? Anyone else?

Given that we (will) have explicit interfaces/schemas for widgets, it
would be nice to generally support specifying widget settings in ZCML.
This opens up the more general topic of specifying schema in ZCML.

Btw, I don't follow your example above. If DualListWidget supports
multiple labels, I'd expect to see them in explicit fields:

  <widget class=".widgets.DualListWidget">
    <field name="availableItemsLabel">Available Vehicles</field>
    <field name="selectedItemsLabel">Selected Vehicles</field>
  </widget>

(This is a hypothetical format for specifying field values in ZCML -
lots of hand waiving at this point.)

I might be totally missing your point :-) but this is the sort of thing
I'm thinking about for widgets and ZCML. (Note also that specifying
schema in ZCML opens up world of other possibilities wrt content types
and whatever else uses schema.)

 -- Garrett



More information about the Zope3-dev mailing list