Stephan Richter wrote:
> On Thursday 28 August 2008, Martin Aspeli wrote:
>> Has anyone written or thought about an adapter/bridge between formlib
>> and z3c.form widgets?
> Not that I know of. But I think it might be hard to do due to the different
> definitions of what a widget and a field is. On the other hand, I might be
> wrong. If someone develops such a bridge, I would add it to z3c.form as an
> optional feature.
I've only briefly looked at it, but I think it may be possible. Can you
be a more specific about how you think their definitions matter?
My idea was to write a widget factory that attempts to adapt a
zope.app.form widget to a z3c.form.interfaces.IWidget or one of its
specialisations. If the widget had enough information to render itself,
then so long as it got the right request through, I would hope that it'd
return a value.
We may not get all the bells and whistles here - things like value
adapters and custom data converters may be out. For most widgets, that
may not be necessary, though.
> BTW, it would be a bridge from zope.app.form widgets to z3c.form ones.
> zope.formlib does not define its own widgets.
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
Zope3-users mailing list