[Grok-dev] object relationships

Martijn Faassen faassen at startifact.com
Wed Jan 28 11:02:31 EST 2009

Hi there,

I'm going to answer quickly as I'm busy during a sprint to work on Grok 
this week. You can use z3c.relationfield and build your own widget for 
it instead of using z3c.relationfieldui. That is indeed intended to pop 
up a page that allows you to select the object, and for a particular 
application I've implemented such a page using hurry.explorer and JSON 
stuff on the server, but since you say you just need a drop-down list 
that'd be overkill. You'd need to write a new widget to select things 
though (using zc.sourcefactory perhaps to provide a source to drop down 

I'm not sure whether the field supports the use of Choice here right 
now, I'd need to do some experimenting there...

You also need to set up some definition of object paths in your 
application by implementing the z3c.objpath utility. The system needs 
this to deal with broken paths, and you also can use this in the 
implementation of the widget (it'd be the token).

Hm, continue bugging me about this, but after this week, I'd be quite 
interested in making z3c.relationfield support your use case.



More information about the Grok-dev mailing list