[navigation] view may implements page_navigation_url to handle them self url generated for pagination
--- a/web/component.py Tue Jun 01 12:19:01 2010 +0200
+++ b/web/component.py Tue Jun 01 12:20:16 2010 +0200
@@ -130,7 +130,10 @@
params = dict(params)
params.update({self.start_param : start,
self.stop_param : stop,})
- if path == 'json':
+ view = self.cw_extra_kwargs.get('view')
+ if view is not None and hasattr(view, 'page_navigation_url'):
+ url = view.page_navigation_url(self, path, params)
+ elif path == 'json':
rql = params.pop('rql', self.cw_rset.printable_rql())
# latest 'true' used for 'swap' mode
url = 'javascript: replacePageChunk(%s, %s, %s, %s, true)' % (
--- a/web/views/navigation.py Tue Jun 01 12:19:01 2010 +0200
+++ b/web/views/navigation.py Tue Jun 01 12:20:16 2010 +0200
@@ -237,7 +237,7 @@
if w is None:
w = view.w
nav = req.vreg['components'].select_or_none(
- 'navigation', req, rset=rset, page_size=page_size)
+ 'navigation', req, rset=rset, page_size=page_size, view=view)
if nav:
if w is None:
w = view.w