web/views/facets.py
changeset 7402 826e5663a686
parent 7300 4058ed1e3bc2
child 7600 75d208ab8444
--- a/web/views/facets.py	Thu May 19 11:50:54 2011 +0200
+++ b/web/views/facets.py	Thu May 19 16:39:24 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -203,6 +203,11 @@
     rtype = 'has_text'
     role = 'subject'
     order = 0
+
+    @property
+    def wdgclass(self):
+        return facet.FacetStringWidget
+
     @property
     def title(self):
         return self._cw._('has_text')
@@ -213,7 +218,7 @@
         default implentation expects a .vocabulary method on the facet and
         return a combobox displaying this vocabulary
         """
-        return facet.FacetStringWidget(self)
+        return self.wdgclass(self)
 
     def add_rql_restrictions(self):
         """add restriction for this facet into the rql syntax tree"""