Creation of an ZClass Instance.
I am new to Zope but I am very appreciative of the How-To's and Guides that have been produced by those that are more experienced than I in the use of Zope. I am currently working on intranet for the company I work for, and am having problems creating an instance of a ZClass, that I created, (DCTask, which is actually the product, DCTaskClass is the ZClass)through the a public interface (form that requires the entry of information that will be added to the instance in the form of properties, such as the description of the task and which department it is created for). The form that is used to submit a creation action resides in a created folder (http://diis/tasks/generator) and therefore does not reside in the folder where the DCTaskClass_add method resides. I think that my main problem, though I could be wrong, is that I haven't found a way to access the _add method from the /task/generator folder through the use of the <FORM ACTION="...">. I believe that once I have can access that file through the form action and have the ability to send all of the relivant information I will be able to create instances through the use of the public interface (ie. the form) Any help will most appreciated. Best regards, MJ Stahl
----- Original Message ----- From: "M.J.M. Stahl" <mjstahl@bizux.net> To: <zope@zope.org> Sent: Wednesday, March 08, 2000 10:23 AM Subject: [Zope] Creation of an ZClass Instance.
The form that is used to submit a creation action resides in a created folder (http://diis/tasks/generator) and therefore does not reside in the folder where the DCTaskClass_add method resides.
I would recommend taking a look at how the management interface does things. (Just do a View Source in the Zope management frame that has the pull down menu listing the different things you can add). In KM|Net News, I made the incoming article form post to a DTML method (AddArticle) that basically follows the steps in the "Adding ZClass Instances Programmatically" how to. http://www.zope.org/Members/tazzzzz/addZClasses I haven't tested this, but posting your form to: "manage_addProduct/YourProductName/YourZClass_add" may do the trick, assuming your form is being called from the Folder where you want the new instance created. Otherwise, you should do something like: "/FolderForNewInstance/manage_addProduct/YourProductName/YourZClass_add" Kevin
participants (2)
-
Kevin Dangoor -
M.J.M. Stahl