Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiWidget with RelationList as value_type #43

Open
krissik opened this issue Apr 20, 2016 · 0 comments
Open

MultiWidget with RelationList as value_type #43

krissik opened this issue Apr 20, 2016 · 0 comments

Comments

@krissik
Copy link

krissik commented Apr 20, 2016

Hi all,

I`m not sure if this is the correct place for my question - please let me know if it is not.

I would like to have a dictionary with RelationList as value_type in plone:

    dictWithRelations = schema.Dict(title=u"Some Relations lists",
                                    required=False,
                                    key_type=schema.TextLine(title=_(u'afield')),
                                    value_type=relationfieldschema.RelationList(
                                       title=_(u'relations'),
                                       default=[],
                                       value_type=relationfieldschema.RelationChoice(
                                           source=CatalogSource(portal_type=['Document', 'Folder'])
                                       ),
                                       required=False,
                                    ))

But the RelatedItemsWidget does not show any item to select. The problem is described in more detail here: https://community.plone.org/t/dictionary-with-relationlists-as-value-type/1984

I have debugged and now it seems to me that the RelatedItemsWidget is missing context. The docstring of MultiWiget says:

Based on the
nature of this (sub) widget setup the internal widget do not have a real
context and can't get bound to it.

Is this the reason why this is not working? What do I have to implement to make it work?

I`m happy about every hint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant