| 12 | |
| 13 | |
| 14 | === Implementing the render_form function of a complete page_renderer === |
| 15 | |
| 16 | This might be a rare case, but it happens. See #569 for full details. |
| 17 | |
| 18 | === Referencing existing topic instances from client-side topic-models (JavaScript / JSON Syntax) serialization syntax === |
| 19 | |
| 20 | {{{ |
| 21 | // for deleting or referencing existing topics, child topic array (of the one specific type) needs to look like this |
| 22 | // (no full json-objects needs to be constructed here), e.g.: |
| 23 | [ "del_id:40190", "ref_id:51291", "ref_id:51131", "ref_id:11318"] |
| 24 | }}} |
| 25 | |
| 26 | For creating new child-topic instances with one big reuquese, the topc models child-topic array needs look like this:[[BR]] |
| 27 | (comment by jri, see updateAggregationMany() in AttachedCompositeValue. 3 cases are supported:) |
| 28 | |
| 29 | {{{ |
| 30 | // create new topic and assign it (when no prefix is found. In this case an entire topic object is expected (with ID -1 and URI "")), e.g.: |
| 31 | [ "del_id:40190", { "id":-1, "uri": "", "type_uri":"dm4.tags.tag", "value": "my_personal_tag"}, "ref_id:51131", "ref_id:11318"] |
| 32 | }}} |
| 33 | |
| 34 | As soon one knows this syntax, this frees one from the error-prone solution of creating topics in a 1st step, e.g. via AJAX-calls, and reference them in a 2nd step (and all that on client-side) |