Changes between Version 46 and Version 47 of RESTController


Ignore:
Timestamp:
06/12/10 21:59:24 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RESTController

    v46 v47  
    112112def person():
    113113    crud.settings.delete_onvalidation = shn_pentity_ondelete
    114     return shn_rest_controller(module, "person", main="first_name", extra="last_name",
    115         pheader=shn_pr_pheader,
    116         onvalidation=lambda form: shn_pentity_onvalidation(form, table="pr_person", entity_class=1),
    117         onaccept=None)
     114    return shn_rest_controller(module, "person",
     115        main="first_name",
     116        extra="last_name",
     117        pheader=shn_pr_pheader
    118118}}}
    119119
     
    128128
    129129The backlinks can be used to reproduce the original request after doing something on the primary resource (e.g., edit or change the selected record).
    130 
    131   * '''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)}}}
    132 
    133130=== Options ===
    134131There are some options which can be set before invoking the REST controller: