Changes between Version 24 and Version 25 of RESTController
- Timestamp:
- 11/20/09 01:41:34 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v24 v25 171 171 {{{ 172 172 # Plug into REST controller 173 s3xrc. set_method(module, 'person', method='search_simple', action=shn_pr_person_search_simple )173 s3xrc.model.set_method(module, 'person', method='search_simple', action=shn_pr_person_search_simple ) 174 174 }}} 175 175 … … 188 188 * '''onaccept=None''' = function to be called at create/update directly after writing to the database 189 189 190 The onvalidation/onaccept callback functions take a dictionary as argument that contains a {{{Storage()}}} object {{{vars}}} with fieldname=value pairs. They must not be invoked when operating on component records, instead use {{{s3xml.model.get_attr(component_tablename, "onvalidation")}}} to retrieve the respective callbacks for the component.190 The onvalidation/onaccept callback functions in turn take a dictionary as argument that contains a {{{Storage()}}} object {{{vars}}} with fieldname=value pairs. They are to be called on create/update actions on the primary resource, while they '''must not''' be invoked when operating on component records, instead use {{{s3xml.model.get_attr(component_tablename, "onvalidation")}}} to retrieve the respective callbacks for the component table.