11 |
11 |
12 from logilab.common.deprecation import obsolete |
12 from logilab.common.deprecation import obsolete |
13 from logilab.mtconverter import html_escape |
13 from logilab.mtconverter import html_escape |
14 |
14 |
15 from cubicweb import NotAnEntity, NoSelectableObject |
15 from cubicweb import NotAnEntity, NoSelectableObject |
16 from cubicweb.selectors import (yes, match_user_groups, non_final_entity, |
16 from cubicweb.selectors import yes, non_final_entity, nonempty_rset, none_rset |
17 nonempty_rset, none_rset) |
|
18 from cubicweb.selectors import require_group_compat, accepts_compat |
17 from cubicweb.selectors import require_group_compat, accepts_compat |
19 from cubicweb.appobject import AppRsetObject |
18 from cubicweb.appobject import AppRsetObject |
20 from cubicweb.utils import UStringIO, HTMLStream |
19 from cubicweb.utils import UStringIO, HTMLStream |
21 from cubicweb.vregistry import yes_registerer |
20 from cubicweb.vregistry import yes_registerer |
22 from cubicweb.common.registerers import accepts_registerer, priority_registerer, yes_registerer |
21 from cubicweb.common.registerers import accepts_registerer, priority_registerer, yes_registerer |
134 |
133 |
135 This method is a dispatched to an actual method selected |
134 This method is a dispatched to an actual method selected |
136 according to optional row and col parameters, which are locating |
135 according to optional row and col parameters, which are locating |
137 a particular row or cell in the result set: |
136 a particular row or cell in the result set: |
138 |
137 |
139 * if row [and col] are specified, `cell_call` is called |
138 * if row is specified, `cell_call` is called |
140 * if none of them is supplied, the view is considered to apply on |
139 * if none of them is supplied, the view is considered to apply on |
141 the whole result set (which may be None in this case), `call` is |
140 the whole result set (which may be None in this case), `call` is |
142 called |
141 called |
143 """ |
142 """ |
144 row, col = context.get('row'), context.get('col') |
143 row = context.get('row') |
145 if row is not None: |
144 if row is not None: |
146 context.setdefault('col', 0) |
145 context.setdefault('col', 0) |
147 view_func = self.cell_call |
146 view_func = self.cell_call |
148 else: |
147 else: |
149 view_func = self.call |
148 view_func = self.call |