Title: Please HELP: Nested ZClass, Nested instance

Hello All
My name is Karl Park.
I am preety new, but very serious in developing on Zope, because my company's intranet is going to move to Zope.
There's one problem that I have been struggling with, but still I couldn't find solutions for it.
I looked through the how-to's and archives, but could find what I really want to see..

So, if there's anybody that can help me with this, could you please give me your solution as to this?

Let me describe my situation below.
I created a ZClass in the Product folder. And anther ZClass under the ZClass(thus nested class)
Thus it loos like something like this.
        Products          ------------------------------------------>Product Folder
                ProjectSpec  --------------------------------------> My Parent ZClass
                       ProductInfo  ---------------------------------> Nested ZClass of "ProjectSpec" ZClass
                       TranslationMemory   ---------------------> Nested ZClass of "ProjectSpec" ZClass
   ProjectHome   --------------------------------------------------> Home folder from which to down, my application resides

        ProjectSpecEntry ---------------------------------------->  All the instances of ProjectSpec will reside here for retrival, viewing, editing etc...

We have many projects, and instance(object) of ProjectSpec Object should be programatically
created of edited through the web interface.

My battle was, create a child object(instance of "ProductInfo" or "TranslationMemory") inside an
object which is instance of "ProjectSpec" object. The reason why I designed my classes like this was,
as all of you know well, I didn't want fo fill up the "Add List" with lots of ZClass list.
From the theoretical perspective,  ProductInfo class(object), TranslationMemory class(object) cannot be thought of without having the

ProjectSpec object.

To do it, I created a DTML Method which accepts user's input and then, if needed, it have to create an object.
(User submits his/her project number in 'prjid' to this DTML method)
The code that I tried it is

<dtml-with "ProjectSpecEntry.manage_addProduct['LBUProjectSpec']">

       <dtml-with "ProjectSpec.createInObjectManager(REQUEST['prjid'], REQUEST)">
          <dtml-call "propertysheets.General.manage_editProperties(REQUEST)">
          <dtml-call reindex_object>

       <dtml-with "_[REQUEST['prjid']]">
           <dtml-with "manage_addProduct['LBUProductInfo']">
               <dtml-with "ProductInfo.createInObjectManager('Product Info', REQUEST)">

First part is to create the parent object, which works just fine.
But the sencond part to create the child object doesn't seem to work.
If I take the easy way, that is, creating othere ZClass on the top of the products folder of Control Panel, I can do it.

But I don't think it is a good desing from the perspective of OOP....

Could any one of you have solution to this, so that I can keep the Class Hierarchy as above and create the object nested?

Your kind reply would be greatly appreciated.
Best Regards

Reply via email to