[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - vocabularywidget.py:1.62

Fred L. Drake, Jr. fred at zope.com
Wed Jan 28 15:55:43 EST 2004


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

Modified Files:
	vocabularywidget.py 
Log Message:
re-organize and reduce imports


=== Zope3/src/zope/app/browser/form/vocabularywidget.py 1.61 => 1.62 ===
--- Zope3/src/zope/app/browser/form/vocabularywidget.py:1.61	Wed Jan 28 14:45:45 2004
+++ Zope3/src/zope/app/browser/form/vocabularywidget.py	Wed Jan 28 15:55:42 2004
@@ -22,18 +22,18 @@
 from xml.sax.saxutils import quoteattr
 
 from zope.interface import implements, implementedBy
+from zope.interface.declarations import directlyProvides
+from zope.publisher.browser import BrowserView
+from zope.security.proxy import trustedRemoveSecurityProxy
+from zope.schema.interfaces import IIterableVocabularyQuery
+from zope.schema.interfaces import ValidationError
+
 from zope.app import zapi
 from zope.app.browser.form import widget
 from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.interfaces.browser.form import IVocabularyQueryView
 from zope.app.interfaces.form import WidgetInputError
 from zope.app.services.servicenames import Translation
-from zope.interface.declarations import directlyProvides
-from zope.publisher.browser import BrowserView
-from zope.component import getView, getService
-from zope.security.proxy import trustedRemoveSecurityProxy
-from zope.schema.interfaces import IIterableVocabularyQuery
-from zope.schema.interfaces import ValidationError
 
 
 # These widget factories delegate to the vocabulary on the field.
@@ -86,7 +86,8 @@
 # Helper functions for the factories:
 
 def _get_vocabulary_widget(field, request, viewname):
-    view = getView(field.vocabulary, "field-%s-widget" % viewname, request)
+    view = zapi.getView(field.vocabulary,
+                        "field-%s-widget" % viewname, request)
     view = trustedRemoveSecurityProxy(view)
     view.setField(field)
     return view
@@ -99,7 +100,7 @@
     query = field.vocabulary.getQuery()
     if query is not None:
         queryname = "widget-query%s-helper" % modifier
-        queryview = getView(query, queryname, request)
+        queryview = zapi.getView(query, queryname, request)
         view.setQuery(query, queryview)
         queryview.setWidget(view)
     return view




More information about the Zope3-Checkins mailing list