[Zope3-Users] Searchable sources and z3c.form
Martin Aspeli
optilude at gmx.net
Mon Aug 25 21:47:51 EDT 2008
Hi,
What is the canonical way to do search-based sources/vocabularies? In
particular, I want to use them with z3c.form.
In zope.schema, I see mention of an ISourceQueriables. I also see these
in zope.app.form, but not in z3c.form. I'm also not quite sure I
understand how these work.
In z3c.formwidget.query, we've got a specialisation of
IVocabularyTokenized that adds a search() method. This is certainly
useful, if a bit non-standard. :-/
Furthermore, from what I can tell from the interfaces in zope.schema,
it's not possible to have a source that can be tokenised, but cannot be
iterated over. I may've misunderstood tokens, but my understanding was
that in order to safely pass strings back and forth to the browser
whilst still supporting values of arbitrary types, we need tokens. A
search-based source will almost certainly not be iterable, though.
Cheers,
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Zope3-users
mailing list