[Zope3-Users] Problems in sequences of custom objects display view

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Oct 30 10:19:16 EST 2006


On Friday 13 October 2006 19:48, ksmith93940-dev at yahoo.com wrote:
> person_widget = CustomWidgetFactory(ObjectWidget, Person)
> persons_widget = CustomWidgetFactory(ListSequenceWidget,
> subwidget=person_widget)

You have to create a "person_widget" for editing and displaying. I do not 
immediately know how to do this, since I am never using the ObjectWidget.
>
>
> class EditFormView(form.EditForm):
>     form_fields = form.Fields(IAddressBook, render_context=True)
>     form_fields['persons'].custom_widget = persons_widget
>
>
> class DisplayFormView(form.DisplayForm):
>     form_fields = form.Fields(IAddressBook, for_display=True)
>     form_fields['persons'].custom_widget = persons_widget

You need a different "persons_widget" here. One that uses display widgets.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list