Enhancement
Critical
Major
Detail
Detail
Detail
#26263
No configuration defaults for `content-layouting` in layout configurations
The content-layouting(getContentLayouting) configuration of tl:LayoutComponent has a tl:InstanceFormat and tl:InstanceDefault annotation. The default value corresponds to tl:ContentLayouting. However, ContentLayouting does not have its own config interface. When creating e.g. a new instance of LayoutComponent.Config, the default values are initialized in particular, i.e. also ContentLayouting. For this purpose it creates new instance of AbstractContentLayouting.Config and sets the implementation class ContentLayouting on it. So valueSet of the implementation class is true. Since the implementation class has been changed, the tl:ConfigurationWriter also writes out the property content-layouting. This is messy and leads to very unreadable configurations.
For example:
#!xml <components> <layout-reference resource="foobar.layout.xml"> <content-layouting class="com.top_logic.layout.structure.ContentLayouting"> <contextMenuFactory class="com.top_logic.layout.basic.contextmenu.component.factory.PlainComponentContextMenuFactory"> <customCommands class="com.top_logic.layout.basic.contextmenu.config.NoContextMenuCommands"/> </contextMenuFactory> </content-layouting> </layout-reference> <layout-reference resource="foobar2.layout.xml"> <content-layouting class="com.top_logic.layout.structure.ContentLayouting"> <contextMenuFactory class="com.top_logic.layout.basic.contextmenu.component.factory.PlainComponentContextMenuFactory"> <customCommands class="com.top_logic.layout.basic.contextmenu.config.NoContextMenuCommands"/> </contextMenuFactory> </content-layouting> </layout-reference> </components>
You can see that for tabbars the result is very messy. Instead would be
#!xml <components> <layout-reference resource="foobar.layout.xml"/> <layout-reference resource="foobar2.layout.xml"/> </components>
a much clearer serialization of the configuration.
Solution
Explicit config interfaces for the implementation classes, although no configuration properties can be set.
Code migration
The Ant task z_remove_default_content_layouting adjusts the layouts in the file system as described above. No code migration is mandatory, the old layouts are of course still valid.
Test
Refactoring, no test.