Daryl Stultz wrote:
> Tim Cook wrote:
> > I guarantee that you will end up with a folder MyClass1ID that
> > contains MyClass2ID.
> You've been very helpful, here, Tim, but I simply can't get this to
> work. I'm wondering if you might be able to create such a product for me
> and send it to me: One product with two classes, creating one class from
> the manager creates the first class with the second inside it.

I probably didn't give all of the instructions in a step by step
manner. I think I gathered this info from different HOWTOs. Here
are the changes that I make to each ZClass.

In the class definition add your propertysheet(s). I only ever
use one / class. I think this is a hold over from years of
RDBMS's. I figure if you need more than one propertysheet then
you need a seperate class. <s>

In the constructor, copy the call to manage_editProperties to a
new one outside of the comment block. Replace the .Basic. with
the name of your property sheet you created.







Then at the bottom of the constructor (I think I got this from
the Job Board HowTo).

Replace everything below the </dtml-comment> with:

<dtml-if NoRedir>

<dtml-if DestinationURL>

 <dtml-call "RESPONSE.redirect(


    <dtml-call "RESPONSE.redirect(

When we call the constructor we will pass 'NoRedir', this keeps
it from returning to the management interface. 

After setting up REQUEST with our desired values for the
propertysheet we call the first constructor like this:

<dtml-call expr="REQUEST.set('id', 'MyClass1ID')">

<dtml-with "manage_addProduct['MyCoolProduct']">
  <dtml-call expr="MyClass1_add(_.None, _, NoRedir=1)">

Next we get the newly constructed MyClass1, and setup to call the
MyClass2 constructor:

<dtml-with "_.getitem('id')">

  <dtml-call expr="REQUEST.set('id', 'MyClass2ID')">

  <dtml-with "manage_addProduct['MyCoolProduct']">
    <dtml-call expr="MyClass2_add(_.None, _, NoRedir=1)">


I am sending you a Product and an example folder via seperate

> Maybe I can write some Python for you or something in exchange :-)

Just signup on the FreePM project at SourceForge & mailing list
and I'll be sure to ask real soon now. <g>

Good Luck,
-- Tim Cook, President --
Free Practice Management,Inc. | http://FreePM.com
Office: (901) 884-4126
Censorship: The reaction of the ignorant to freedom.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to