Changes between Version 31 and Version 32 of S3/S3REST/s3_rest_controller


Ignore:
Timestamp:
10/24/10 06:08:23 (14 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3REST/s3_rest_controller

    v31 v32  
    100100This allows you to define a common onvalidation callback for both ''create'' and ''update''.
    101101
    102 Onvalidation callbacks are meant to allow form data validation, where any validation errors are to be put directly into the form as:
     102Onvalidation callbacks are meant to allow additional form data validation (beyond individual field validators). The callables receive the form as first and only parameter, while their return values will be ignored.
    103103
     104Any validation errors are to be reported directly into the form as:
    104105{{{
    105106form.errors[fieldname] = error_msg
     
    111112  - '''error_msg''' is the error message to be displayed in the form close to that field
    112113
    113 The callables receive the form as first and only parameter, and their return values will be ignored.
     114If after the execution of the onvalidation callback any messages are found in {{{form.errors}}}, then no data are being imported and instead, the process will return to the input view with the messages displayed close to the respective form fields.
    114115
    115116'''Important:'''
    116   On-validation callbacks are also invoked in non-interactive data imports, where multiple records are being processed in one and the same request. Therefore the callback '''must not redirect'''!
    117 
     117In non-interactive data imports, the error message will be added to the import tree as extra attribute of the invalid element. The XML importer will however process all records in the import tree in order to find all validation errors before reporting the invalid tree to the sender, and in case {{{ignore_errors}}} is used, all valid records will be imported in the first attempt. Therefore the callback '''must not redirect'''!
    118118==== On-accept Callbacks ====
    119119