[Product-Developers] Named vocabularies, dexterity, autocompletewidget...
Paul Roeland
paul at cleanclothes.org
Mon Jan 16 17:01:17 UTC 2012
Hi Joaquin,
thanks. Yes, they look good, and I can probably use them, actually
KeywordSource from plone.formwidget.autocomplete demo.py comes closest
and can be easily adapted.
I just think my usecase is rather general; after there are more than
about 10 terms in a vocabulary, (In my case countries in Europe, why do
they keep splitting up, and where will I put Scotland ;-)
anything else than an autocomplete widget becomes user-hostile. So a
don't-repeat-yourself solution would be best.
But this'll work, thanks!
On 2012-01-16 17:45, "Joaquín R." wrote:
> Hey Paul,
>
> There are a bunch of already-made sources (not vocabularies per-se)
> available in plone.formwidget.contenttree. Those are all work with the
> widgets in plone.formwidget.autocomplete.
>
> You can also find vocabularies that provide a .search() method in
> plone.app.vocabularies, although I'm not sure that they work with the
> widget. Let us know if you find out.
>
> Cheers,
> -joaquín
>
>
> El 16/01/12 10:24, Paul Roeland escribió:
>> anybody have tips on what is the recommended way to handle named
>> vocabularies in dexterity that need to be searchable?
>>
>> The dexterity manual explains how to put vocabularies in for instance
>> plone.app.registry
>>
>> All fine and dandy, but these don't provide a 'search' method then,
>> which makes them unfit for
>> plone.formwidget.autocomplete.AutocompleteFieldWidget
>>
>> of course, I could probably manually write a search method for each of
>> them, but that feels very redundant.
>>
>> Or am I on the wrong track, and is there some other solution people
>> recommend?
>>
>> Paul Roeland
>>
>> _______________________________________________
>> Product-Developers mailing list
>> Product-Developers at lists.plone.org
>> https://lists.plone.org/mailman/listinfo/plone-product-developers
More information about the Product-Developers
mailing list