Changes between Version 18 and Version 19 of RESTController


Ignore:
Timestamp:
11/20/09 01:25:15 (15 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RESTController

    v18 v19  
    122122}}}
    123123
    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 to be forwarded as ''pheader'' variable to the view.
     124New: 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.
    125125
    126 If you pass a function or lambda, it has to take 5 arguments:
     126If you pass a function or lambda as pheader, which has to take 5 arguments:
    127127  - '''resource''' = name of the primary resource
    128128  - '''record_id''' = id of the primary resource record
     
    131131  - '''same=None''' = backlink URL to reproduce the request (with empty method and containing the string '[id]' instead of the primary resource record id)
    132132
    133 These backlinks can be used to reproduce the original request after doing something on the primary resource (e.g., edit or change the selected record).
     133The backlinks can be used to reproduce the original request after doing something on the primary resource (e.g., edit or change the selected record).
    134134
    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()}}}
    136136
    137137=== Options ===