[Zope3-Users] Re: Using attributes in a nameChooser

Florian Lindner mailinglists at xgm.de
Sat Aug 6 07:55:43 EDT 2005

Am Freitag, 5. August 2005 21:21 schrieb Ruslan Spivak:
> Florian Lindner <mailinglists at xgm.de> writes:
> [...]
> > Can this set_before_add behevoir be somehow defined global for the object
> > or even better be imposed by the container? So that it does not need to
> > be declared by every addform.
> Not sure.


Let me explain why I want to do that. I still have the problem that I want to 
enable to user to enter the __name__ of the object on creation (in the 
Now it's working more or less. In the chooseName function I read out name 
attribute and return this name. One problem of this method is that I can not 
really return an validation error of the name field if the name is already 
taken. AFAIK I can't develop a custom schema field that validates it before, 
because fields do not have access to their objects.

What do you think is the best solution of the problem above? Simply that the 
user could choose a name of the object.



More information about the Zope3-users mailing list