--- a/web/component.py Fri Feb 14 14:46:25 2014 +0100
+++ b/web/component.py Fri Feb 14 14:06:56 2014 +0100
@@ -108,12 +108,8 @@
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 in ('json', 'ajax'):
- # 'ajax' is the new correct controller, but the old 'json'
- # controller should still be supported
+ else:
url = self.ajax_page_url(**params)
- else:
- url = self._cw.build_url(path, **params)
# XXX hack to avoid opening a new page containing the evaluation of the
# js expression on ajax call
if url.startswith('javascript:'):
@@ -122,9 +118,9 @@
def ajax_page_url(self, **params):
divid = params.setdefault('divid', 'pageContent')
+ params['fname'] = 'view'
params['rql'] = self.cw_rset.printable_rql()
- return js_href("$(%s).loadxhtml(AJAX_PREFIX_URL, %s, 'get', 'swap')" % (
- json_dumps('#'+divid), js.ajaxFuncArgs('view', params)))
+ return self._cw.build_url('ajax', **params)
def page_link(self, path, params, start, stop, content):
url = xml_escape(self.page_url(path, params, start, stop))