[Zope3-Users] Re: INameChooser + accessing schema field

Ruslan Spivak rspivak at nuxeo.com
Tue Feb 8 16:48:03 EST 2005


В Втр, 08/02/2005 в 22:20 +0100, jürgen Kartnaller пишет:
> Ruslan Spivak wrote:
> > Hi.
> > 
> > For my Blog container i implemented INameChooser adapter to be able to
> > customize names of blog entries, but in chooseName(name, blogentry)
> > method when i access schema fields of 'blogentry' they have default
> > values and not those that are entered in add form. The point is i'd like
> > to create name containing words from 'title' field of blog entry, but
> > it's empty for that moment. 
> > Is there any mean to get to schema field value entered in add form
> > inside chooseName method?
> 
> You need to define the fields needed with set_before_add in your addForm 
> directive.
> These fields are set before your name chooser is called.
> 
> Jürgen
> 

That works, thanks Jürgen.

Ruslan




More information about the Zope3-users mailing list