--- a/web/views/treeview.py Mon May 18 13:49:28 2009 +0200
+++ b/web/views/treeview.py Mon May 18 14:08:21 2009 +0200
@@ -13,7 +13,7 @@
from cubicweb.interfaces import ITree
from cubicweb.selectors import implements
from cubicweb.view import EntityView
-from cubicweb.web.views.basecontrollers import JSonController
+from cubicweb.web.views.basecontrollers import jsonize, JSonController
def treecookiename(treeid):
return str('treestate-%s' % treeid)
@@ -149,8 +149,8 @@
self.wview(parentvid, self.req.execute(rql), treeid=treeid, initial_load=False)
w(u'</li>')
-
@monkeypatch(JSonController)
+@jsonize
def js_node_clicked(self, treeid, nodeeid):
"""add/remove eid in treestate cookie"""
cookies = self.req.get_cookie()