[component] Fix URL generation for navigation component (closes #2464832) stable
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 12 Mar 2013 19:24:43 +0100
branchstable
changeset 8726 e08ab56ea2ac
parent 8723 d2472948da9c
child 8728 75be9de9d68e
[component] Fix URL generation for navigation component (closes #2464832)
web/component.py
--- a/web/component.py	Fri Feb 08 18:36:00 2013 +0100
+++ b/web/component.py	Tue Mar 12 19:24:43 2013 +0100
@@ -108,7 +108,9 @@
         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':
+        elif path in ('json', 'ajax'):
+            # 'ajax' is the new correct controller, but the old 'json'
+            # controller should still be supported
             url = self.ajax_page_url(**params)
         else:
             url = self._cw.build_url(path, **params)