I created my own control panel setting where I need a Tuple field like so:
class IControlPanel(Interface): resourceOrder = schema.Tuple( title=_("resource_order", default="Resource Order"), description=_("resource_order_desc", default="..."), unique=True, value_type=schema.Choice( source=registeredResources ) ) class ControlPanelForm(RegistryEditForm): schema = IControlPanel schema_prefix = "ecode" label = u'Site Edit Settings' site = getSite() ...
<browser:page name="ecode-controlpanel" for="Products.CMFPlone.interfaces.IPloneSiteRoot" class=".controlpanel.ControlPanelView" permission="cmf.ManagePortal" />
The new control panel renders fine and I can use the Tuple Widget. But of course it is not possible to save tuples or any other kind of lists in the registry. So I have to serialize it somehow which in general is no problem at all. But where would I do that?
Also when I try to make a quickinstall I get this error:
TypeError: There is no persistent field equivalent for the field `resourceOrder` of type `Tuple`.
It seems I can not use the Tuple Widget at all in the schema. So how can I create list-like field in the frontend but store it as a joined list or something similar? I tried to reinvent as few as possible. Do I need a completely new view which I then embed somehow into the control panel?