web/controller.py
changeset 4878 2f75a8439338
parent 4741 f9a176ebe090
child 4883 11899d28337f
equal deleted inserted replaced
4869:230ace4d68c0 4878:2f75a8439338
    76                 rql = unicode(rql, self._cw.encoding)
    76                 rql = unicode(rql, self._cw.encoding)
    77             pp = self._cw.vreg['components'].select_or_none('magicsearch', self._cw)
    77             pp = self._cw.vreg['components'].select_or_none('magicsearch', self._cw)
    78             if pp is not None:
    78             if pp is not None:
    79                 self.cw_rset = pp.process_query(rql)
    79                 self.cw_rset = pp.process_query(rql)
    80         return self.cw_rset
    80         return self.cw_rset
    81 
       
    82     def check_expected_params(self, params):
       
    83         """check that the given list of parameters are specified in the form
       
    84         dictionary
       
    85         """
       
    86         missing = []
       
    87         for param in params:
       
    88             if not self._cw.form.get(param):
       
    89                 missing.append(param)
       
    90         if missing:
       
    91             raise RequestError('missing required parameter(s): %s'
       
    92                                % ','.join(missing))
       
    93 
       
    94 
    81 
    95     def notify_edited(self, entity):
    82     def notify_edited(self, entity):
    96         """called by edit_entity() to notify which entity is edited"""
    83         """called by edit_entity() to notify which entity is edited"""
    97         # NOTE: we can't use entity.rest_path() at this point because
    84         # NOTE: we can't use entity.rest_path() at this point because
    98         #       rest_path() could rely on schema constraints (such as a required
    85         #       rest_path() could rely on schema constraints (such as a required