Changes between Version 19 and Version 20 of RESTController


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

--

Legend:

Unmodified
Added
Removed
Modified
  • RESTController

    v19 v20  
    124124New: 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 as pheader, which has to take 5 arguments:
     126If you pass a function or lambda as pheader, then it has to take 5 arguments:
    127127  - '''resource''' = name of the primary resource
    128128  - '''record_id''' = id of the primary resource record
     
    133133The 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, 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)}}}
    136136
    137137=== Options ===