for future reference, and to help others:

- autocompletewidget requires an IQuerySource-providing object
- that needs to have a 'search()' method
- and then needs to be bound like this:

class myfancySourceBinder(object):
    implements(IContextSourceBinder)

    def __call__(self, context):
        return myfancySource(context)

- then, use myfancySourceBinder() as the source for your
AutocompleteFieldWidget or  AutocompleteMultiFieldWidget


Providing a search() method on an IVocabularyFactory object directly
does not work, or at least I found it impossible using grok.implements

Paul

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

Reply via email to