[Zope3-checkins] CVS: Zope3/src/zope/app/utilities -
schema.py:1.1.2.4
Sidnei da Silva
sidnei at x3ng.com.br
Wed Aug 13 10:37:16 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/utilities
In directory cvs.zope.org:/tmp/cvs-serv28777/src/zope/app/utilities
Modified Files:
Tag: dreamcatcher-ttwschema-branch
schema.py
Log Message:
__name__-geddon. Use getName for getting the name of interfaces
=== Zope3/src/zope/app/utilities/schema.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/utilities/schema.py:1.1.2.3 Wed Aug 13 09:20:44 2003
+++ Zope3/src/zope/app/utilities/schema.py Wed Aug 13 09:36:41 2003
@@ -16,6 +16,11 @@
$Id$
"""
from zope.app import zapi
+from zope.component import getAdapter
+from zope.app.context import ContextWrapper
+from zope.interface import implements
+from zope.app.form.utility import setUpEditWidgets, applyWidgetsChanges
+from zope.proxy import removeAllProxies
from zope.app.browser.container.adding import Adding
from zope.app.browser.form.editview import EditView
from zope.app.i18n import ZopeMessageIDFactory as _
@@ -154,6 +159,15 @@
return self.context.mutableschema
schema = property(_get_schema)
+
+ def _setUpWidgets(self):
+ adapted = getAdapter(self.context, self.schema)
+ if adapted is not self.context:
+ adapted = ContextWrapper(adapted, self.context, name='(adapted)')
+ self.adapted = adapted
+ setUpEditWidgets(self, self.schema, names=self.fieldNames,
+ content=removeAllProxies(self.adapted))
+
class SchemaAdding(Adding):
More information about the Zope3-Checkins
mailing list