<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=koi8-r">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#fffbf0>
<DIV><FONT face=Arial size=2>I have trivial class:</FONT></DIV>
<DIV><FONT face=Arial size=2>&lt;file MyClass.py&gt;:</FONT></DIV>
<DIV><FONT face=Arial size=2>from OFS import SimpleItem<BR>from Globals import 
DTMLFile</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>def manage_addMyClass(self, id, 
REQUEST):<BR>&nbsp;&nbsp;&nbsp; "add"<BR>&nbsp;&nbsp;&nbsp; 
a=MyClass(id)</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
self._setObject(id,a)</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; if REQUEST:<BR></FONT><FONT 
face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 
self.manage_main(self, REQUEST)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>manage_addMyClassForm=DTMLFile('dtml\manage_addMyClassForm',globals())</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>class 
MyClass(SimpleItem.SimpleItem):<BR>&nbsp;&nbsp;&nbsp; "minimal 
object"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; meta_type='MyClass'</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; def __init__(self, 
id):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"init"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.id=id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>I can add objects of MyClass 
through ZMI. </FONT></DIV>
<DIV><FONT face=Arial size=2>How can I add some object through my own interface: 
for example, on button click on DTML form?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3>Regards,<BR>Serg.</FONT><BR></DIV></FONT></BODY></HTML>