web/views/tableview.py
branchstable
changeset 5632 1e7c662bd6f8
parent 5622 aa93a64c53d7
child 5633 879590c52679
child 5668 7bd6a8a126b8
equal deleted inserted replaced
5631:e2e99cdf0899 5632:1e7c662bd6f8
   319 
   319 
   320     * the actual query (`actualrql` form parameter) whose results will be
   320     * the actual query (`actualrql` form parameter) whose results will be
   321       displayed with default restrictions set
   321       displayed with default restrictions set
   322     """
   322     """
   323     __regid__ = 'initialtable'
   323     __regid__ = 'initialtable'
   324     __select__ = nonempty_rset() & match_form_params('actualrql')
   324     __select__ = nonempty_rset()
   325     # should not be displayed in possible view since it expects some specific
   325     # should not be displayed in possible view since it expects some specific
   326     # parameters
   326     # parameters
   327     title = None
   327     title = None
   328 
   328 
   329     def call(self, title=None, subvid=None, headers=None, divid=None,
   329     def call(self, title=None, subvid=None, headers=None, divid=None,
   330              displaycols=None, displayactions=None, mainindex=None):
   330              displaycols=None, displayactions=None, mainindex=None):
   331         """Dumps a table displaying a composite query"""
   331         """Dumps a table displaying a composite query"""
   332         actrql = self._cw.form['actualrql']
   332         try:
   333         self._cw.ensure_ro_rql(actrql)
   333             actrql = self._cw.form['actualrql']
       
   334         except KeyError:
       
   335             actrql = self.cw_rset.printable_rql()
       
   336         else:
       
   337             self._cw.ensure_ro_rql(actrql)
   334         displaycols = self.displaycols(displaycols, headers)
   338         displaycols = self.displaycols(displaycols, headers)
   335         if displayactions is None and 'displayactions' in self._cw.form:
   339         if displayactions is None and 'displayactions' in self._cw.form:
   336             displayactions = True
   340             displayactions = True
   337         if divid is None and 'divid' in self._cw.form:
   341         if divid is None and 'divid' in self._cw.form:
   338             divid = self._cw.form['divid']
   342             divid = self._cw.form['divid']