On Jan 18, 2012, at 3:56 AM, Paul Roeland wrote:

> 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

It would need to be on the vocabulary returned by the vocabulary factory, not 
on the factory. I think.
David


----------
David Glick
 Web Developer
 [email protected]
 206.286.1235x32

Groundwire Consulting is here.

http://groundwire.org/about/FAQ-gw-consulting


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

Reply via email to