[primary view] support for entity_call on primary view
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 19 Jan 2011 12:47:04 +0100
changeset 6847 c1d33aff7715
parent 6842 117b53c10d79
child 6848 f87cd875c6db
[primary view] support for entity_call on primary view
view.py
web/views/primary.py
--- a/view.py	Wed Jan 19 09:31:15 2011 +0100
+++ b/view.py	Wed Jan 19 12:47:04 2011 +0100
@@ -209,10 +209,11 @@
         if rset is None:
             raise NotImplementedError, (self, "an rset is required")
         wrap = self.templatable and len(rset) > 1 and self.add_div_section
-        # XXX propagate self.extra_kwars?
+        # XXX propagate self.extra_kwargs?
         for i in xrange(len(rset)):
             if wrap:
                 self.w(u'<div class="section">')
+            self.cw_row = i
             self.wview(self.__regid__, rset, row=i, **kwargs)
             if wrap:
                 self.w(u"</div>")
--- a/web/views/primary.py	Wed Jan 19 09:31:15 2011 +0100
+++ b/web/views/primary.py	Wed Jan 19 12:47:04 2011 +0100
@@ -52,10 +52,8 @@
         """
         return []
 
-    def cell_call(self, row, col):
-        self.cw_row = row
-        self.cw_col = col
-        entity = self.cw_rset.complete_entity(row, col)
+    def entity_call(self, entity):
+        entity.complete()
         self.render_entity(entity)
 
     def render_entity(self, entity):