Changes between Version 19 and Version 20 of RESTController
- Timestamp:
- 11/20/09 01:28:05 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v19 v20 124 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 as pheader, whichhas to take 5 arguments:126 If you pass a function or lambda as pheader, then it has to take 5 arguments: 127 127 - '''resource''' = name of the primary resource 128 128 - '''record_id''' = id of the primary resource record … … 133 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, you need to define ''onvalidation'' and ''onaccept'' attributes in the {{{s3xrc.model.add_component()}}}, or set them later using {{{s3xrc.model.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 get callbacks invoked on Joining Requests, you need to set the ''onvalidation'' and ''onaccept'' attributes in the {{{s3xrc.model.add_component()}}} definition, or you set them later using {{{s3xrc.model.set_attr(component, function)}}} 136 136 137 137 === Options ===