newbie question about adding a product instance
I was working through the Zope Book and trying to add a new product. I want to create an addForm so that all the properties are set from the get-go. I modifed that addForm that was generated for me, then I went searching through the add method that was generated. There's a comment in there that says you can use this <dtml-call "propertysheets.Basic.manage_editProperties( REQUEST)"> to set other attributes from the form, but it's always returning an attribute error for "basic." I've tried changing "Basic" to a couple of other things (like the name of my property sheet), but I can't seem to get past this. So, does anybody have an idea what I'm missing? Should I just ignore that comment in the generated DTML and replace the generated method with my own Python script? (Assuming I can figure out how to get access to the container, form, and underlying object from the python script....) Thanks in Advance. -Chris ===== Chris Curvey Curvey Consulting http://www.chriscurvey.com __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Chris Curvey writes:
... ZClass constructor ... <dtml-call "propertysheets.Basic.manage_editProperties( REQUEST)">
to set other attributes from the form, but it's always returning an attribute error for "basic." This comment is indeed confusing:
I think, it refers to an example where there is a "common property sheet" called "Basic". Then, you could edit the properties in this sheet as shown above. Unfortunately, it does not speak about the assumption. But it into the collector. If you want to modify properties not defined in a "PropertySheet" but the properties inherited from a PropertyManager, you would use: <dtml-call "manage_changeProperties(REQUEST)"> Dieter
participants (2)
-
Chris Curvey -
Dieter Maurer