On 27 April 2010 04:17, Maxfield <[email protected]> wrote: > > Dear Product Developers, I have a problem with z3c.form, as it cannot seem > to find the widget for my form. > This error is generated when i visit /@@topics_edit -- relevant code is > below the error... any help would > be greatly appreciated. It seems like something simple. No, there is no code > for storing or retrieving the > data to be edited yet, but I think the form should still display. > -max
If you're on the latest plone.app.z3cform, make sure you've install that product in the Plone site (portal_quickinstaller). Also ensure that plone.app.z3cform's ZCML is loaded. Martin > > Traceback (innermost last): > Module ZPublisher.Publish, line 119, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 42, in call_object > Module plone.z3cform.layout, line 56, in __call__ > Module plone.z3cform.layout, line 50, in update > Module z3c.form.form, line 187, in update > Module z3c.form.form, line 134, in update > Module z3c.form.form, line 126, in updateWidgets > Module z3c.form.field, line 242, in update > Module zope.component._api, line 102, in getMultiAdapter > Module zope.component._api, line 115, in queryMultiAdapter > Module zope.component.registry, line 216, in queryMultiAdapter > Module zope.interface.adapter, line 482, in queryMultiAdapter > Module z3c.form.browser.orderedselect, line 84, in > SequenceSelectFieldWidget > Module zope.component._api, line 104, in getMultiAdapter > ComponentLookupError: ((<zope.schema._field.List object at 0x4a1d170>, > <zope.schema._bootstrapfields.TextLine object at 0x4a1d110>, <HTTPRequest, > URL=http://localhost:8903/@@topics_edit>), <InterfaceClass > z3c.form.interfaces.IFieldWidget>, u'') > > > > The relevant code is here: > -------interface description (interfaces.py) ----------- > from zope.schema import List, TextLine > from zope.interface import Interface > class ITopics(Interface): > topics = List( title = u'Topic List', > description = u'Topics which people can claim > specialization in', > value_type = TextLine(title=u"topics"), > default = None, > required = False, > readonly = True ) > > ------form controller (topic_manager.py) -------- > from z3c.form import form > from interfaces import ITopics > from z3c.form import field > from plone.app.z3cform.layout import wrap_form > class TopicsEditForm(form.EditForm): > fields = field.Fields(ITopics) > TopicsEditView = wrap_form(TopicsEditForm) > > ------zcml slug (configure.zcml)------- > . > . > . > <browser:page > for="*" > name="topics_edit" > class=".topic_manager.TopicsEditView" > permission="zope2.View" > /> > . > . > . > > > > > > > > _______________________________________________ > Product-Developers mailing list > [email protected] > http://lists.plone.org/mailman/listinfo/product-developers > > _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
