[Zope3-Users] Using formlib schema.Choice with zc.table FieldColumn

Gary Poster gary at zope.com
Thu Jan 25 20:52:10 EST 2007


On Jan 25, 2007, at 6:09 PM, <ksmith93940-dev at yahoo.com> <ksmith93940- 
dev at yahoo.com> wrote:

> Whoa, really bad line breaks, here is the pastbin link
>
> http://zope3.pastebin.com/867518

Thanks, Kevin.  I've modified the test you wrote, made it pass, and  
committed it (revision 72232).

The answer is that you need to have choice fields bound; and the way  
you bind fields is to have `getFieldContext` return the value to be  
bound.  You only need this for context-bound fields: only Choice  
fields, and collection fields that use them, AFAIK.

The common case is that you just want to return the item, which is  
what I did in the example.  There are many other possibilities,  
though--we use this for some funky aggregated search results, if I  
recall correctly, for instance.

I hope the test changes make clear what you need to do.  Thanks for  
improving this!

Gary



More information about the Zope3-users mailing list