Home | Trees | Indices | Help |
|
---|
|
object --+ | S3SQLFormElement --+ | S3SQLSubForm --+ | S3SQLInlineComponent
Form element for an inline-component-form This form element allows CRUD of multi-record-components within the main record form. It renders a single hidden text field with a JSON representation of the component records, and a widget which facilitates client-side manipulation of this JSON. This widget is a row of fields per component record. The widget uses the s3.ui.inline_component.js script for client-side manipulation of the JSON data. Changes made by the script will be validated through Ajax-calls to the CRUD.validate() method. During accept(), the component gets updated according to the JSON returned. @ToDo: Support filtering of field options Usecase is inline project_organisation for IFRC PartnerNS needs to be filtered differently from Partners/Donors, so can't just set a global requires for the field in the controller - needs to be inside the widget. See private/templates/IFRC/config.py
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Class Variables | |
prefix = "sub"
|
Properties | |
Inherited from |
Method Details |
Method to resolve this form element against the calling resource.
|
Initialize this form element for a particular record. Retrieves the component data for this record from the database and converts them into a JSON string to populate the input field with.
|
Validator method, converts the JSON returned from the input field into a Python object.
|
Widget method for this form element. Renders a table with read-rows for existing entries, a variable edit-row to update existing entries, and an add-row to add new entries. This widget uses s3.inline_component.js to facilitate manipulation of the entries.
|
Read-only representation of this sub-form
|
Post-processes this form element against the POST data of the request, and create/update/delete any related records.
|
Class Variable Details |
prefix
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Mar 15 08:51:49 2019 | http://epydoc.sourceforge.net |