Changes between Version 18 and Version 19 of RESTController
- Timestamp:
- 11/20/09 01:25:15 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v18 v19 122 122 }}} 123 123 124 New: the optional '''pheader''' argument. This helps you to display some information about the primary resource record in the view while operating on a joined resource (e.g. the person's name and ID, when displaying a list of available images for this person). You may pass static content, or a function or lambda to produce content, which is tobe forwarded as ''pheader'' variable to the view.124 New: the optional '''pheader''' argument. This helps you to display some information about the primary resource record in the view while operating on a component (e.g. the person's name and ID, when displaying a list of available images for this person). You may pass static content, or a function or lambda to produce content, which will be forwarded as ''pheader'' variable to the view. 125 125 126 If you pass a function or lambda , ithas to take 5 arguments:126 If you pass a function or lambda as pheader, which has to take 5 arguments: 127 127 - '''resource''' = name of the primary resource 128 128 - '''record_id''' = id of the primary resource record … … 131 131 - '''same=None''' = backlink URL to reproduce the request (with empty method and containing the string '[id]' instead of the primary resource record id) 132 132 133 The sebacklinks can be used to reproduce the original request after doing something on the primary resource (e.g., edit or change the selected record).133 The backlinks can be used to reproduce the original request after doing something on the primary resource (e.g., edit or change the selected record). 134 134 135 * '''NOTE:''' Callbacks from CRUD settings (defined as in the example above) as well as onvalidation and onaccept callbacks are only invoked at requests on the main resource, but not at joined requests. To invoke on Joined Requests, need to define in the {{{jrlayer.add_jresource()}}} or later using {{{jrlayer.set_attr()}}}135 * '''NOTE:''' Callbacks from CRUD settings (defined as in the example above) as well as onvalidation and onaccept callbacks are only invoked at requests on the main resource, but not at joined requests. To invoke on Joined Requests, you need to define ''onvalidation'' and ''onaccept'' attributes in the {{{s3xrc.model.add_component()}}}, or set them later using {{{s3xrc.model.set_attr()}}} 136 136 137 137 === Options ===