In INameChooser
chooseName(self, name, object)
method takes default object name and the object you are adding. Thru
this object I would expect you to have access to attributes of your
object entered in the objects add form. Unless the fields in your
form you need access to are not in your objec
On Saturday 10 September 2005 11:05, Florian Lindner wrote:
> I want to override the createAndAdd method mothed in a view class. Since I
> don't want to do all the work I want to derive my class from the AddView
> class from /home/florian/Zope3/src/zope/app/form/browser/add.py. The only
> thing I d
Hello Florian,
No clue. Next hint is to override the add method of AddView.
The default is:
return self.context.add(content)
Try something like this:
self.context[my_id]=content
Another hint:
self.context.contentName = my_id
return self.context.add(content)
Have a look at \src\zope\app\containe
Am Sonntag, 11. September 2005 03:52 schrieb Alen Stanisic:
> I don't think you would do it in AddView. You need to implement an
> adapter for your container providing
> zope.app.container.interfaces.INameChooser where chooseName() method
> will return name for you objects.
A INameChooser adapter
Am Samstag, 10. September 2005 18:53 schrieb Adam Groszer:
> Hello Florian,
>
> I suggest you download the examples for Philipp's book from
> http://worldcookery.com/files/examples-1.0.tgz
> Have a look at \examples-1.0\14containers\folder.py.
A INameChooser adapter would really be perfect for me.
I don't think you would do it in AddView. You need to implement an
adapter for your container providing
zope.app.container.interfaces.INameChooser where chooseName() method
will return name for you objects.
Alen
On Sat, 2005-09-10 at 17:05 +0200, Florian Lindner wrote:
> Hello,
> I want to overr
Hello Florian,
I suggest you download the examples for Philipp's book from
http://worldcookery.com/files/examples-1.0.tgz
Have a look at \examples-1.0\14containers\folder.py.
Saturday, September 10, 2005, 5:05:26 PM, you wrote:
> Hello,
> I want to override the createAndAdd method mothed in a vi
Hello,
I want to override the createAndAdd method mothed in a view class. Since I
don't want to do all the work I want to derive my class from the AddView
class from /home/florian/Zope3/src/zope/app/form/browser/add.py. The only
thing I do in my class is to change the name (object id) of the obj