18. Overlay
It is possible to render a x0-system-screen in x0-overlay-mode. Due to the x0-system design (all screens are present, but only one visible) a screen instance will be set up coexisting with the original source version.
18.1. Example
See very limited example (screen only contains one single x0-object) at Example 6 - Screen Overlay.
For more comprehensive overlay examples, see:
Local repository /example/screen_overlay - Complete overlay implementation
Advanced overlay patterns in the 10.13. Object Examples Reference
19. Object Instancing
Additionally it is possible to create x0-object-instances and decorate them with existing x0-object properties (enhanced templating functionality).
Example: Object Instances (Example 11) - Demonstrates dynamic object creation and instancing.
Warning
The x0-object-instances feature is not well-tested. Use with caution, especially in combination with x0-overlay-mode and x0-forms.
19.1. Decorating Instances
x0-object-decorating is done inside object.json (unlike referencing
x0-objects inside skeleton.json).
If you reference a FormList like this, the sections from Formlist1 will
be appended to Formlist2.
"Formlist2": {
"Type": "FormfieldList",
"RefID": "Formlist1",
"Attributes": {
"Sections": [
{
...
}
]
}
}
Note
Also decorating already decorated objects is possible. The only thing: order matters.
19.2. Instance Prefixing
Specifying an “InstancePrefix” will prefix the referenced form fields so they will get a unique id.
"FormList1": {
"InstancePrefix": "PrefixID",
"RefID": "FormList2",
"Attributes": {
}
}
19.3. Merging Instance Attributes
By default, attributes get merged.
19.4. Replacing Instance Attributes
You can replace attributes in the referenced object by providing
AttributesReplace.
"FormList1": {
"RefID": "FormList2",
"AttributesReplace": [
{ "": "" },
{ "": "" }
]
}