Previous Chapter | Next Chapter | Up | Next Section | Contents

Factories, add methods and Wizards


To make a Product appear in the global product add list you need to create a Factory for it. This process is covered in the Zope Content Manager's Guide , so it will only be briefly explained here. A Factory binds a "meta type" to an add form and an add method. Basically the process is this: If the user has adequate permissions, the "meta type" appears as a choice in the product add list. When it is chosen, the add form object is called. The add form object collects information needed to initialize the object and calls the add method which initializes a new object and stuffs it in its container object.

Z Classes make the chore of creating Factories and add methods easier by allowing you to create them automatically when you create your Z Class. Simply supply a "meta type" and check the "Create constuctor objects." check box when creating your Z Class. Zope will then create the necessary objects for you and your class will be accessible from the global product add list.

Previous Chapter | Next Chapter | Up | Next Section | Contents

Banner.Novgorod.Ru