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

Jim Fulton jim at zope.com
Mon Mar 8 14:40:27 EST 2004


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

Added Files:
	__init__.py configure.zcml 
Log Message:
Moved the adapter and presentation services from zope.app.services to
their own packages under zope.app. Also folded
zope.app.services.surrogate into the new adapter module,
zope.app.adapter.adapter.


=== Added File Zope3/src/zope/app/presentation/browser/__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 2004/03/08 19:40:27 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/presentation/browser/configure.zcml ===
<configure xmlns="http://namespaces.zope.org/browser">

  <addMenuItem
      class="...presentation.LocalPresentationService"
      description=
     "A Presentation Service allows you to register views, resources and skins"
      title="Presentation Service"
      permission="zope.ManageServices"
      />

  <editform
    schema="...presentation.IPageRegistration"
    name="index.html"
    class=".PageRegistrationView"
    menu="zmi_views"
    label="Change page"
    permission="zope.ManageServices" />

  <addform
      schema="..presentation.IPageRegistration"
      name="PageRegistration"
      content_factory="..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"
      usage="addingdialog" />

</configure>




More information about the Zope3-Checkins mailing list