view.py
changeset 5715 2c3e83817a8e
parent 5679 0f2ded880d01
child 5725 b5d595b66c35
--- a/view.py	Thu Jun 10 14:16:49 2010 +0200
+++ b/view.py	Thu Jun 10 16:23:07 2010 +0200
@@ -366,6 +366,17 @@
     __select__ = non_final_entity()
     category = 'entityview'
 
+    def call(self, **kwargs):
+        if self.cw_rset is None:
+            self.entity_call(self.cw_extra_kwargs.pop('entity'))
+        else:
+            super(EntityView, self).call(**kwargs)
+
+    def cell_call(self, row, col, **kwargs):
+        self.entity_call(self.cw_rset.get_entity(row, col), **kwargs)
+
+    def entity_call(self, entity, **kwargs):
+        raise NotImplementedError()
 
 class StartupView(View):
     """base class for views which doesn't need a particular result set to be