Forms are currently available in the following "flavors":
- Edit components for editing an existing persistent object. The component comes with a built-in edit/view mode switch. The component is not suitable for entering values for a new object to be created, as the edit/apply handling makes no sense in this case.
- Setting components: Represent the attributes of the component model. The component has an edit/view mode channel, but is displayed in edit mode by default and does not have a built-in edit/view mode switch. In the default configuration, the component displays the attributes of a transient object that is implicitly built when its model channel is initialized.
- Object creation dialog can instantiate either a predefined or a user-selectable object type, pre-filling attribute values of the new object to be created. Its use is restricted to dialogs.
- The "Transaction with input" dialog allows the values of an implicitly created transient object, which represents the form model, to be filled in order to be able to enter parameters for a subsequent user-defined transaction.
Goal
The existing templates are to become wizards of a generalized form handling, whose modules could also be combined in new ways, for example:
- An object creation without dialog, for example in a tab, a tile, or in a micro-frontend (an application layout that performs an object creation as the only functionality).
- A self-defined creation dialog with custom layout.
- An editing view without view mode.
Application
There is a new template "Form (general)" with which a form can be created in which the form model is not implicitly built from the model object of the form, but can be created via a function. This usually creates a transient object whose properties are offered for editing. The user input in the form can then be further processed in a freely definable command for accepting/saving.
Code migration
In recorded test scripts, the technical identifiers of fields of internal objects (e.g. rows of composition tables in forms) can change. If the error message does not provide sufficient information, individual actions may have to be re-recorded.
Test
- /com.top_logic.demo/src/test/java/test/com/top_logic/demo/scripted/form/TestGenericForms.script.xml
- Test View: Technical Demo > Components > Generic Forms