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

Fred L. Drake, Jr. fred@zope.com
Mon, 19 May 2003 10:44:48 -0400


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

Modified Files:
      Tag: schema-vocabulary-branch
	vocabularywidget.py 
Log Message:
renderResults() requires the current value to be passed in

=== Zope3/src/zope/app/browser/form/vocabularywidget.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/browser/form/vocabularywidget.py:1.1.2.3	Fri May 16 16:12:13 2003
+++ Zope3/src/zope/app/browser/form/vocabularywidget.py	Mon May 19 10:44:17 2003
@@ -198,7 +198,7 @@
         contents = []
         have_results = False
         if self.queryview:
-            s = self.queryview.renderResults()
+            s = self.queryview.renderResults(value)
             if s:
                 contents.append(self._div('queryresults', s))
                 s = self.queryview.renderInput()
@@ -357,14 +357,14 @@
     def renderInput(self):
         return self.renderQueryInput()
 
-    def renderResults(self):
+    def renderResults(self, value):
         results = self.getResults()
         if results is not None:
-            return self.renderQueryResults(results)
+            return self.renderQueryResults(results, value)
         else:
             return ""
 
-    def renderQueryResults(self, results):
+    def renderQueryResults(self, results, value):
         raise NotImplementedError(
             "renderQueryResults() must be implemented by a subclass")