[Zope3-dev] Re: __name__ in auto generated addforms

Florian Lindner mailinglists at xgm.de
Sun May 22 15:54:51 EDT 2005


Am Sonntag, 22. Mai 2005 01:31 schrieben Sie:
> В Сбт, 21/05/2005 в 19:33 +0200, Florian Lindner пишет:
> > Hello,
> > is it possible to let the user enter the name of a object (the __name__
> > attribut) in forms that are auto generated from schema data (via the
> > addform directive)?
> >
> > Thanks,
> >
> > Florian
>
> Hi, Florian.
>
> You need create adapter to zope.app.container.interfaces.INameChooser
> and register it for your xxx interface.
>
> Take a look at bugtracker application inside zope, it contains example
> of INameChooser usage.

Ok, so I can choose the name of the object which is about to be created. But 
how can I allow the user to enter a value for the name? Create a schema field 
name and use that to set __name__? Or is there a more elegant way?

Thanks,

Florian


More information about the Zope3-dev mailing list