Tim Cook wrote:
> 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)">
>   </dtml-with>
> </dtml-with>

There were some details I still left out here. This call to the
second constructor is in another DTML Method. The REQUEST values
are passed through using hidden form variables from the first
DTML Method.
Also in the second DTML MEthod you must be sure that you are
inside the parent folder context first.

<dtml-with "PARENTS[0]">
 <dtml-with "_.getitem('id')">
   <dtml-call expr="REQUEST.set('id', 'MyClass2ID')">
   <dtml-with "manage_addProduct['MyCoolProduct']">
     <dtml-call expr="MyClass2_add(_.None, _, NoRedir=1)">

Then you do a call to index_html or some appropriate Method so
the user isn't left with a blank display.

This will make sense to Daryl in the examples I sent. If anyone
else wants a better explaination maybe I'll do a formal HOW-TO

-- 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