major
nice-to-have
minor
major
#25471
Generischer Create-Dialog mit dynamischer Formularanzeige
Until now, Create dialogs have either been specific to the model element being created, or they have created inconsistent model elements because not all required attributes were filled in.
Improvement
A generic Create dialog that displays the form definition of the model element to be created by default. If multiple types can be created at a given point, the dialog should offer a selection of possible asset types and adapt the displayed form accordingly. It should be possible to customize the form for each asset type so that, for example, only a selection of the model element’s attributes is offered during creation.
Application
- /com.top_logic.element/create/genericCreate.xml
- /com.top_logic.element/create/genericCreateStructure.xml
- /com.top_logic.model.search/create/genericCreateDialog.template.xml
Code Migration
- The XML syntax of tl:PostCreateAction has changed. Instead of {{{#!xml
<setModel channel="selection">
<target>
<dialogParent/>
</target>
</setModel> }}}
Now:
{{{#!xml
<setModel target="selection(dialogParent())"/> }}}
- The template element/createStructuredElement.xml can be replaced by com.top_logic.element/create/genericCreateStructure.xml (drop-in replacement) to create a creation dialog with automatic form display.
- The templates element/createAttributed.xml and element/meta/createStructuredElement.xml should also be replaced by com.top_logic.element/create/genericCreateStructure.xml and com.top_logic.element/create/genericCreate.xml, respectively (reconfiguration required).
- The following components are deprecated. These and their subclasses should be replaced by `com.top_logic.element.layout.create.GenericCreateComponent `:
- com.top_logic.element.layout.structured.CreateAttributedStructuredElementComponent
- com.top_logic.element.layout.structured.StructuredElementCreateComponent
- com.top_logic.element.meta.gui.CreateAttributedComponent
- com.top_logic.element.meta.gui.DefaultCreateAttributedComponent
Test
- The default Create dialog for `tl:StructuredElement`, e.g., for creating ` DemoTypes:A`:
- /com.top_logic.demo/src/test/com/top_logic/demo/scripted/model/attribute/TestCompositeAttribute.script.xml
- `/com.top_logic.demo/src/test/com/top_logic/demo/scripted/layout/TestStructureCreateDialog.script.xml `