web/views/basecontrollers.py
changeset 4984 6cb91be7707f
parent 4914 dcb055f32d9b
parent 4976 34fd21f65702
child 5113 f8cbdb51e6d4
--- a/web/views/basecontrollers.py	Wed Mar 24 08:40:21 2010 +0100
+++ b/web/views/basecontrollers.py	Wed Mar 24 08:42:49 2010 +0100
@@ -394,7 +394,14 @@
                              for key, value in extraargs.items())
         comp = self._cw.vreg[registry].select(compid, self._cw, rset=rset, **extraargs)
         extraargs = extraargs or {}
-        return comp.render(**extraargs)
+        stream = comp.set_stream()
+        comp.render(**extraargs)
+        extresources = self._cw.html_headers.getvalue(skiphead=True)
+        if extresources:
+            stream.write(u'<div class="ajaxHtmlHead">\n')
+            stream.write(extresources)
+            stream.write(u'</div>\n')
+        return stream.getvalue()
 
     @check_pageid
     @xhtmlize