Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-11 Thread Alen Stanisic
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

Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-11 Thread Stephan Richter
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

Re[2]: [Zope3-Users] Calling createAndAdd with different object id

2005-09-11 Thread Adam Groszer
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

Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-11 Thread Florian Lindner
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

Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-11 Thread Florian Lindner
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.

Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-10 Thread 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. Alen On Sat, 2005-09-10 at 17:05 +0200, Florian Lindner wrote: > Hello, > I want to overr

Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-10 Thread 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. Saturday, September 10, 2005, 5:05:26 PM, you wrote: > Hello, > I want to override the createAndAdd method mothed in a vi

[Zope3-Users] Calling createAndAdd with different object id

2005-09-10 Thread Florian Lindner
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