Major
Detail
Major
Detail
Detail
#26495
Scripting: Referencing objects compactly in drag-and-drop operations
An object in the tree is typically identified during recording by the short breadcrumb "Project > TP 1 > WP 1 > xyz"(com.top_logic.layout.scripting.recorder.ref.TreeLabelPathNaming$TreeLabelPathName).
This is easy for testers to understand and keeps the templates compact and, most importantly, manageable. It's also more in line with the black box approach, since not much else is visible to a user in the tree.
The drag and drop recording scripts, on the other hand, use a much more technical whitebox approach(com.top_logic.layout.scripting.recorder.ref.TLObjectTreeNaming$TLObjectTreeName). This requires specifying relations for father-child relationships and a nested list of <path><entry> tags. Compact specification as a breadcrumb is not possible here, although the commands also operate on components. This prevents effective use of D&D functions in templates.
Improvement
When recording for D&D, the compact breadcrumb syntax should also be used (as far as possible).
Test
Record Drag and Drop, e.g. under
- Technical Demo > Components > Drag & Drop
- Technical Demo > Components > Drag & Drop to
The scripts should be recorded in breadcrumb syntax, if possible, and playable.
Code migration
ReplaceTreeGridDragSourceByExpression and TableGridDragSourceByExpression in layout files with GridDragSourceByExpression.
Data migration
Layouts created inApp need to be adjusted as in code migration. This is done by the migration script Ticket_26495_Removed_GridDragSource_extensions.migration.xml when the application is booted.