If a base module provides configuration for a component (e.g., the user administration component), it is currently difficult to configure that component differently within your project. If a property named “foo” of the component needs to be changed, a template must be added (or modified) in the base module, and this “foo” property must be set. Then, this template must be referenced in the project, and the property must be set. Even worse is the approach of copying the layout file into your own project and modifying it.
Improvement
It should be possible to specify an overlay file for a layout file, in which a configuration snippet is entered for a component—identified by its name—that modifies the component according to your preferences. See LayoutStructure.
Code Migration
- The unused properties "compoundMaster" and "sizeAttribute" in layout templates are removed.
- The "parentName" and "projectTreeName" properties in layout templates and masterFrame.xml files must be removed.
- Regenerate layouts (Ant layout_setup).
- A new folder, WEB-INF/layouts/my.project.name, is created, containing all of the application’s sub-layouts.
- This folder also contains all administrative layouts (which are actually already defined by base components). These should be removed in a subsequent refactoring after updating to #24407 (see the migration instructions there).
- Component names that reference components from different *.layout.xml files must be qualified (e.g., ` myComponentName ` becomes `my/component.layout.xml#myComponentName`).
- The same applies to all component references from non-layout XML files (scripted tests, test templates, Relation.xml files, role profile definitions, ViewStateConfiguration.xml files, and calls to ComponentName#newName(String)).
- For XML files, the "Migration #23037 UpdateComponentName" launch configuration can be customized and run with the XML files or folders.
- The Ant target "z_create_qualified_name_mapping" can be used to create a mapping that associates a local component name with its qualified component name, thereby simplifying the migration.
Open Issues
- The main tab cannot be configured, as this would result in the entire MainLayout being replaced.
Test
No additional testing.