Enhancement
Major
Detail
Major
Detail
Bugfix
(User-visible)
If a node is collapsed in a tree that contains a selected node in its subtree, then the procedure varies depending on the type of tree component.
- The tl:TreeComponent is configurable and uses a flag to decide whether the selection should be adjusted in this case, e.g. by the first visible and valid parent node, or whether the selection is retained in this form.
- The tl:TreeTableComponent and TreeGrid adjust the selection as already explained in 1.
It would be desirable to provide a configuration option for all components to let the user decide whether or not the component adjusts the selection when it is collapsed.
Code migration
In layout XMLs exported to the development environment, the selectCollapsed attribute must be changed to adjustSelectionWhenCollapsing when using the following templates:
- com.top_logic/tileTree.template.xml
- com.top_logic/tileTreetable.template.xml
- com.top_logic/tree.template.xml
- com.top_logic/treetable.template.xml
- com.top_logic.element/treegrid.template.xml
#!patch @@ -6,21 +6,21 @@ template="com.top_logic/tree.template.xml" > <arguments defaultSelection="true" expandRoot="true" expandSelected="true" isSecurityMaster="false" model="" partnerGroup="" rootVisible="true" - selectCollapsed="false" + adjustSelectionWhenCollapsing="false" showOnlySelectableNodes="false" > <name key="dynamic.2f6a4cc9-28a2-4bc0-b38a-c10d19aedcfc"> <en>Demo Types</en> <en>Demo Types</en> </name> <modelBuilder class="com.top_logic.model.search.providers.TreeModelByExpression" children="node->$node.get(`tl.element:StructuredElementContainer#children`)" finite="true" leafPredicate="false"
Test
src/test/java/test/com/top_logic/demo/scripted/layout/inapp/TestCollapsedSelection.script.xml