Hello,

I've tried to implement a complex ControlPanelForm with formlib.
It works so far, except it's not possible for me to assign some custom widgets to a sub type of a sequence qidget. How do I assign the WYSIWYGWidget from plone.app.form.widgets.wysiwygwidget to the text field of IControlSettingsEntry?

Any Suggestions?

Thanks
Hanno

Below is an examle code:

-> interfaces.py
class IControlSettingsEntry(Interface):
   title = schema.TextLine(title=_(u"Title"),
                           description=_("Enter a title."),
                           required = True)
   text = schema.Text(title=_(u"Long Text"),
                          description=_("Enter a text."),
                          required=True)

class IControlSettings(Interface):
   mylist = schema.List(title=u'My List',
                          description=u'List data',
                          default=[],
                          value_type = schema.Object(IControlSettingsEntry, 
title=u"Entry"))
-> broswer/controlsettings.py class SettingsEntry:
   implements(IControlSettingsEntry)
entry_widget = CustomWidgetFactory(ObjectWidget,SettingsEntry) class ControlSettingsControlPanel(ControlPanelForm):
   form_fields = form.Fields(IControlSettings)
   controlsettingswidget = CustomWidgetFactory(ListSequenceWidget,
                                        subwidget=entry_widget)


-
Diese Information ist ausschliesslich fuer den Adressaten bestimmt und kann vertraulich oder gesetzlich geschuetzte Informationen enthalten. Wenn Sie nicht der bestimmungsgemaesse Adressat sind, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Anderen als dem bestimmungsgemaessen Adressaten ist es untersagt, diese E-Mail weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu verwenden. Wir verwenden aktuelle Virenschutzprogramme und Content-Filter. Fuer Schaeden, die dem Empfaenger gleichwohl durch von uns zugesandte mit Viren befallene E-Mails entstehen, schliessen wir jede Haftung aus. - This e-mail and any attachments is confidential and solely intended for the indicated addressee. If you are not the intended recipient or an authorized person, please note, that any form of notice, disclosure, reproduction or circulation of the contents of this mail is prohibited. In this case, please immediately inform the sender of the e-mail an destroy this e-mail. We use updated antivirus protection software. We do not accept any responsibility for damages caused anyhow by viruses.
-
catWorkX GmbH: Sitz der Gesellschaft in Hamburg, HRB: 71494, USt-IdNr.: DE201625856, Geschaeftsfuehrung: Dipl. Kfm. Andreas Girnuweit, Dipl.-Ing. Oliver Groht, Dr. Wolfgang Tank

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to