web/views/tableview.py
changeset 5508 6718ba5db0eb
parent 5467 57372dbfd114
parent 5504 97ed78b54956
child 5545 25fd74c23f91
--- a/web/views/tableview.py	Thu May 06 14:29:07 2010 +0200
+++ b/web/views/tableview.py	Mon May 10 16:59:32 2010 +0200
@@ -224,7 +224,7 @@
             # compute column header
             if headers is not None:
                 label = headers[displaycols.index(colindex)]
-            if colindex == mainindex:
+            if colindex == mainindex and label is not None:
                 label += ' (%s)' % self.cw_rset.rowcount
             column = TableColumn(label, colindex)
             coltype = self.cw_rset.description[0][colindex]
@@ -287,8 +287,7 @@
         """
         etype, val = self.cw_rset.description[row][col], self.cw_rset[row][col]
         if val is not None and not self._cw.vreg.schema.eschema(etype).final:
-            e = self.cw_rset.get_entity(row, col)
-            e.view(cellvid or 'outofcontext', w=self.w)
+            self.wview(cellvid or 'outofcontext', self.cw_rset, row=row, col=col)
         elif val is None:
             # This is usually caused by a left outer join and in that case,
             # regular views will most certainly fail if they don't have