[tabs] don't spin madly when called in ajaxy/facet context; defer to default view
--- a/web/views/tabs.py Thu Mar 12 15:18:54 2009 +0100
+++ b/web/views/tabs.py Fri Mar 13 11:05:37 2009 +0100
@@ -101,8 +101,13 @@
'cubicweb.ajax.js', 'cubicweb.tabs.js', 'cubicweb.lazy.js'))
# tabbed views do no support concatenation
# hence we delegate to the default tab
- if self.req.form.get('vid') == 'primary':
- entity.view(default)
+ form = self.req.form
+ if form.get('vid') == 'primary':
+ entity.view(default, w=self.w)
+ return
+ rql = form.get('rql')
+ if rql:
+ self.req.execute(rql).get_entity(0,0).view(default, w=self.w)
return
# prune tabs : not all are to be shown
tabs = self.prune_tabs(tabs)