[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/presentation - __init__.py:1.2 configure.zcml:1.2

Jim Fulton cvs-admin at zope.org
Fri Nov 21 12:11:49 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/services/presentation
In directory cvs.zope.org:/tmp/cvs-serv31414/src/zope/app/browser/services/presentation

Added Files:
	__init__.py configure.zcml 
Log Message:
Replaced the view service with a presentation service, in a subpackage.

Removed the service search interface for now until we can spend the
time to come up with something better.


=== Zope3/src/zope/app/browser/services/presentation/__init__.py 1.1 => 1.2 ===
--- /dev/null	Fri Nov 21 12:11:49 2003
+++ Zope3/src/zope/app/browser/services/presentation/__init__.py	Fri Nov 21 12:11:19 2003
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# Copyright (c) 2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Presentation-service presentations
+
+$Id$
+"""
+
+class PageRegistrationView(object):
+    """Helper class for the page edit form."""
+
+    def update(self):
+        super(PageRegistrationView, self).update()
+        if "UPDATE_SUBMIT" in self.request:
+            self.context.validate()


=== Zope3/src/zope/app/browser/services/presentation/configure.zcml 1.1 => 1.2 ===
--- /dev/null	Fri Nov 21 12:11:49 2003
+++ Zope3/src/zope/app/browser/services/presentation/configure.zcml	Fri Nov 21 12:11:19 2003
@@ -0,0 +1,32 @@
+<configure xmlns="http://namespaces.zope.org/browser">
+
+  <menuItem
+      for="zope.app.interfaces.container.IAdding"
+      menu="add_service"
+      action="zope.app.services.presentation.LocalPresentationService"
+      title="Presentation Service"
+      permission="zope.ManageServices"
+      />
+
+  <editform
+    schema="zope.app.services.presentation.IPageRegistration"
+    name="index.html"
+    class=".PageRegistrationView"
+    menu="zmi_views"
+    label="Change page"
+    permission="zope.ManageServices" />
+
+  <addform
+      schema="zope.app.services.presentation.IPageRegistration"
+      name="PageRegistration"
+      content_factory="zope.app.services.presentation.PageRegistration"
+      keyword_arguments="required factoryName name permission 
+                         layer attribute"
+      set_before_add="template"
+      label="Register a view page"
+      permission="zope.ManageServices"
+      fields="required name
+              template factoryName layer permission status attribute" />
+
+
+</configure>




More information about the Zope3-Checkins mailing list