web/views/ajaxcontroller.py
branchstable
changeset 9229 739ae5366bed
parent 8974 c8520188eb4b
child 9492 c7fc56eecd1a
equal deleted inserted replaced
9228:90b8c7a7e205 9229:739ae5366bed
     1 # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
   369         viewobj = self._cw.vreg['views'].select(vid, req, rset=rset)
   369         viewobj = self._cw.vreg['views'].select(vid, req, rset=rset)
   370     except NoSelectableObject:
   370     except NoSelectableObject:
   371         vid = req.form.get('fallbackvid', 'noresult')
   371         vid = req.form.get('fallbackvid', 'noresult')
   372         viewobj = self._cw.vreg['views'].select(vid, req, rset=rset)
   372         viewobj = self._cw.vreg['views'].select(vid, req, rset=rset)
   373     viewobj.set_http_cache_headers()
   373     viewobj.set_http_cache_headers()
   374     req.validate_cache()
   374     if req.is_client_cache_valid():
       
   375         return ''
   375     return self._call_view(viewobj, paginate=req.form.pop('paginate', False))
   376     return self._call_view(viewobj, paginate=req.form.pop('paginate', False))
   376 
   377 
   377 
   378 
   378 @ajaxfunc(output_type='xhtml')
   379 @ajaxfunc(output_type='xhtml')
   379 def component(self, compid, rql, registry='components', extraargs=None):
   380 def component(self, compid, rql, registry='components', extraargs=None):