enhancement
critical
major
minor
minor
In a table configuration, you can configure any number of columns. However, each column must be assigned a fixed name in the configuration. A dynamic number of columns can be implemented using a `tl:TableConfigurationProvider`. This is relatively simple—at least for tables that only display values but do not allow editing—but it requires writing a plug-in.
Improvement
tl:DynamicColumnProviderByExpression—a tl:TableConfigurationProvider that can be parameterized via TL-Script and adds a dynamic number of columns to a table.
By specifying a save operation, this provider can also be used in a `tl:GridComponent` to add additional input fields to the row being edited.
Code Migration
The API of com.top_logic.element.meta.form.FieldProvider for creating input elements for model elements has changed
- from FormMember getFormField(AttributeUpdate attributeUpdate, AttributeUpdateContainer updateContainer, String fieldName)
- to FormMember getFormField(EditContext editContext, String fieldName)
- tl:AttributeUpdate is a possible type of tl:EditContext. The FieldProvider may no longer access the model element being edited (tl:TLStructuredTypePart), but only its properties, for which EditContext provides access methods.
- Various other (internal) APIs have been generalized from ` AttributeUpdate ` to `EditContext `.
Test
- /com.top_logic.demo/src/test/com/top_logic/demo/scripted/table/TestDynamicTableColumns.script.xml
- View in tl-demo: Technical Demo: Components: Dynamic Columns.