web/views/basecontrollers.py
branchtls-sprint
changeset 643 616191014b8b
parent 603 18c6c31bbaf4
child 644 5e5b296a657e
--- a/web/views/basecontrollers.py	Mon Feb 16 20:40:12 2009 +0100
+++ b/web/views/basecontrollers.py	Mon Feb 16 20:42:30 2009 +0100
@@ -211,14 +211,14 @@
             self.req.set_content_type(content_type)
             return xmlize(data)
         return data
-
+    
     def html_exec(self, rset=None):
-        """html mode: execute query and return the view as HTML"""
+        # XXX try to use the page-content template
         req = self.req
         rql = req.form.get('rql')
         if rset is None and rql:
             rset = self._exec(rql)
-            
+        
         vid = req.form.get('vid') or vid_from_rset(req, rset, self.schema)
         try:
             view = self.vreg.select_view(vid, req, rset)
@@ -239,6 +239,10 @@
             if divid == 'pageContent':
                 stream.write(u'<div id="contentmain">')
         view.dispatch()
+        extresources = req.html_headers.getvalue(skiphead=True)
+        stream.write(u'<div class="ajaxHtmlHead">\n') # XXX use a widget ?
+        stream.write(extresources)
+        stream.write(u'</div>\n')
         if req.form.get('paginate') and divid == 'pageContent':
             stream.write(u'</div></div>')
         source = stream.getvalue()