1.1 --- a/examples/Zope/SimpleProduct/__init__.py Fri Aug 27 17:38:21 2004 +0000
1.2 +++ b/examples/Zope/SimpleProduct/__init__.py Fri Aug 27 17:39:16 2004 +0000
1.3 @@ -32,23 +32,15 @@
1.4 </html>
1.5 """
1.6
1.7 -def addProduct(dispatcher, id):
1.8 +def addProduct(self, id, REQUEST=None):
1.9 """
1.10 The function used to add the product.
1.11 """
1.12
1.13 product = SimpleProduct(id)
1.14 - dispatcher.Destination()._setObject(id, product)
1.15 - return """
1.16 - <html>
1.17 - <head>
1.18 - <title>Simple Product Added</title>
1.19 - </head>
1.20 - <body>
1.21 - Simple product added to namespace!
1.22 - </body>
1.23 - </html>
1.24 - """
1.25 + self.Destination()._setObject(id, product)
1.26 + if REQUEST:
1.27 + return self.manage_main(self, REQUEST)
1.28
1.29 def initialize(context):
1.30 context.registerClass(