[Zope] DTML to create a product instance (ExternalFile)

davis marques davismarques169@hotmail.com
Sun, 21 Apr 2002 23:12:47 -0700


I'm new to Zope and am having a lot of problems figuring out how to do 
something in DTML which I expect should be relatively simple.

I have a product called ExternalFile installed.  I want to be able to create 
a new instance of this object based on information supplied by the user in a 
form.  I presume DTML is capable of doing this, but my searches have turned 
up nothing of help to date.

I found this snippet of code from a Job Board HOWTO on the Zope site, but am 
not clear if I can reuse this model for ExternalFile, and what the method 
name might be to add a new instance of the product.

<dtml-call "REQUEST.set('ts', ZopeTime())">
<dtml-call "REQUEST.set('id',_.str(_.int(ts)))">

<dtml-with "job_board_entry.createInObjectManager(REQUEST['id'], REQUEST)">
</dtml-with>

I can surmise from this that REQUEST is an array that is passed to the 
object's createInObjectManager method.  Is this method common to all objects 
that reside in folders?  How can you find out the names of the available 
methods for a product?

Also, the with construct is looking quite mysterious to me right now.  If 
anyone has a sensible explanation for it that would be appreciated.

Any help would be appreciated.

Davis

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.