[Grok-dev] Re: Vocabulary registration

Christian Theune ct at gocept.com
Mon Mar 19 12:18:24 EDT 2007


Am Mittwoch, den 14.03.2007, 07:51 -0400 schrieb Philipp von
Weitershausen:
> Martijn Faassen wrote:
> >> I'm struggling a little here registering a vocabulary for use in a form.
> >> I'm reusing code that I'd previously used and trying to twig it to work
> >> with grok.
> >>
> > 
> > As a general note, the way vocabularies work needs work in Grok (or 
> > sources, their successor in Zope 3). That is, I consider it rather too 
> > difficult to set them up in Zope 3 now, and we should provide an easier 
> > way for Grok.
> > 
> > Anyone any thoughts on how to do this with sources?
> 
> Sources should work right away since they don't have the name-based 
> lookup through the utility registry. The Choice field accepts several 
> things as the 'source' parameter:
> 
> - a source object (providing ISource). This is useful for when the 
> source is pretty much not dependend on the object that you're currently 
> trying to validate.
> 
> - a source factory (providing IContextSourceBinder). This is a callable 
> that take the current context (the object you're trying to validate) and 
> returns a source.

I really need to get the sourcefactory out there. I'll work on that and
give an example how to integrate it with grok.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20070319/83c6a650/attachment.bin


More information about the Grok-dev mailing list