[Zope] Getting calling folder data into a ZClass addForm

complaw@hal-pc.org complaw@hal-pc.org
Fri, 8 Jun 2001 18:41:01 GMT


Is there any way for the addForm DTML Method for a ZClass to know what folder it
was called from so that some DTML logic can be implemented to load certain data
(for properties) into the input elements of the HTML form used to load the
initial data into the soon-to-be created object instance?

Is the context object available in the standard ZClass addForm?

I want to make a generalized ZClass that references other class instances that
exist within the calling folder (and no where else).  The references,
preferrably, would be stored in a list property of the object.  

The alternative is to make ZClasses for each specific folder (with boolean
properties relating indicating relationship with the other object(s) in the
folder).  I would like to avoid the alternative because it is more maintenance.

Does anyone use a mechanism for maintaining relationships between some (but not
all) objects in a folder in some object for dynamic referencing?

When you think about it, there is a lot of utility if someone can work out this
trick.

Thanks in advance,

Ron