[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/adapter -
__init__.py:1.3.2.1
Garrett Smith
garrett at mojave-corp.com
Thu Feb 26 00:11:22 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/browser/services/adapter
In directory cvs.zope.org:/tmp/cvs-serv25181/src/zope/app/browser/services/adapter
Modified Files:
Tag: garrett-widgets2-branch
__init__.py
Log Message:
Yet another branch for widgets refactoring (YABFWR).
=== Zope3/src/zope/app/browser/services/adapter/__init__.py 1.3 => 1.3.2.1 ===
--- Zope3/src/zope/app/browser/services/adapter/__init__.py:1.3 Wed Feb 25 18:02:19 2004
+++ Zope3/src/zope/app/browser/services/adapter/__init__.py Thu Feb 26 00:10:52 2004
@@ -32,7 +32,8 @@
from zope.app.services.adapter import IAdapterRegistration
from zope.app.interfaces.services.registration import IRegistration
-from zope.app.form.utility import getWidgetsDataForContent
+from zope.app.interfaces.form import IEditWidget
+from zope.app.form.utility import applyWidgetsChanges
from zope.app.event import publish
from zope.app.event.objectevent import ObjectCreatedEvent
from zope.app.services.adapter import AdapterRegistration
@@ -41,16 +42,15 @@
def __init__(self, *args):
super(AdapterRegistrationAdd, self).__init__(*args)
- setUpWidgets(self, IAdapterRegistration)
+ setUpWidgets(self, IAdapterRegistration, IEditWidget)
def refresh(self):
if "FINISH" in self.request:
- data = getWidgetsData(self, IAdapterRegistration, strict=True)
+ data = getWidgetsData(self, IAdapterRegistration)
registration = AdapterRegistration(**data)
publish(self.context.context, ObjectCreatedEvent(registration))
registration = self.context.add(registration)
- getWidgetsDataForContent(self, IRegistration, registration,
- strict=False)
+ applyWidgetsChanges(view, IRegistration, context=registration)
self.request.response.redirect(self.context.nextURL())
return False
More information about the Zope3-Checkins
mailing list