Tree Node widget with Teamcenter Extension - nested TreeNodes always receive DataView context instead of parent TreeNode (Mendix 11.12)
0
Hi everyone,I'm building a Teamcenter application using the Teamcenter Extension for Mendix and I'm trying to understand the correct way to use the Tree Node widget for displaying a BOM.EnvironmentMendix Studio Pro 11.12Tree Node widget (part of Data Widgets 3.11.1 - latest available version)Latest Teamcenter Extension 4.2.0Teamcenter 2506TC Connector 2512.1.1What I'm trying to achieveI'd like to display the BOM by expanding one level at a time, using nested TreeNodes rather than retrieving the entire structure with ExpandAllLevelsThe Teamcenter Extension generates these microflows for BOM navigation:BOMWindow_GetTopBOMLineBOMLine_ExpandOneLevel_GetChildrenSo my intention is:Create a BOMWindow.Get the Top BOMLine.TreeNode1 calls BOMLine_ExpandOneLevel_GetChildrenTreeNode2 (nested inside) should call BOMLine_ExpandOneLevel_GetChildren again, but this time using the selected BOMLine from TreeNode1 as its input.Repeat for deeper levels.The problemThe Teamcenter sample application appears to work this way.In the sample application, the nested TreeNode receives:Object of treeNode1 as the parameter to the datasource microflow.However, in Mendix 11.12, when I configure the nested TreeNode, the parameter is always automatically set to enclosed dataView widget:Object of dataView1 and I cannot change it.As a result:TreeNode1 correctly shows the first level of the BOM.Expanding any node causes TreeNode2 to call the datasource again with the original Top BOMLine.Every expanded node therefore displays exactly the same first-level children instead of that node's own children.Parent associationI also noticed that newer versions of the Tree Node widget include a Parent association property, which older versions (used by the Teamcenter sample application) do not.I have tried using the self-reference association:BOMLine_BOMLine_Parent which works correctly when supplying a complete flattened list of BOMLines, but it doesn't seem to affect how the datasource parameter is passed between nested TreeNodes.My questionsHas the Tree Node widget behaviour changed in Mendix 11 or Data Widgets 3.11.1?Is there now a different way for nested TreeNodes to receive the current TreeNode object instead of the DataView object?Is the new Parent association property intended to replace the older recursive TreeNode pattern?Has anyone successfully implemented lazy-loading of a Teamcenter BOM using ExpandOneLevel with nested TreeNodes in Mendix 11?At the moment I've implemented a workaround by retrieving multiple levels into a flat list and using the Parent association, but I'd much prefer to use the Tree widget recursively as it appears to have been designed.Any advice or examples would be greatly appreciated.Thanks!