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

Jim Fulton cvs-admin at zope.org
Tue Nov 18 17:34:41 EST 2003


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

Added Files:
      Tag: adaptergeddon-branch
	__init__.py configure.zcml 
Log Message:
Implememented local presentation services


=== Added File Zope3/src/zope/app/browser/services/presentation/__init__.py ===
##############################################################################
#
# 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: __init__.py,v 1.1.2.1 2003/11/18 22:34:41 jim Exp $
"""

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()


=== Added File Zope3/src/zope/app/browser/services/presentation/configure.zcml ===
<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