Hi,
I'm trying to get the TreeGrid (loadDataOnDemand = true) working with MultiDS and Multilink functionality. I am using SmartClient Version: v12.1p_2020-08-16/Enterprise Development Only (built 2020-08-16).
I managed to get the MultiDS working. However when I try to use the multilink functionality (linkDataFetchMode "single") as well, things start to fall apart.
I can get the first level of data displayed. However when I try to expand, it doesn't show the children.
It seems that the problem lies in how getDrawArea() (ISC_Grids.js:5527) of the treegrid body determines the draw area in case of mulitlink.
getDrawArea() calls getTotalRows() (ISC_Grids.js:58299), which calls this.data.getLength() (ISC_DataBinding.js 59380), which invokes Super (ISC_Core.js:40873). This calls _getCachedNodeLength(this.root), which in turn calls _getCachedNodeLengthFromIndex(node, path) (ISC_Core.js:36396). This returns entry.paths[path].nodeLength;
Since it always checks against the nodeLength of the root node, it seems it will always just return the number of records directly under the root node.
I had to modify the __add function of the ResultTree because it tried to _incrementRecursionCount, _decrementRecursionCount and _getRecustionCount failed without explicitely specifying the path. The _assert parent == root failed for nodes not in root.
I'm not sure if I'm not populating the data correctly, or that the multilink is not working with loadDataOnDemand? Is there more in depth documentation on multilink trees?
I'm trying to get the TreeGrid (loadDataOnDemand = true) working with MultiDS and Multilink functionality. I am using SmartClient Version: v12.1p_2020-08-16/Enterprise Development Only (built 2020-08-16).
I managed to get the MultiDS working. However when I try to use the multilink functionality (linkDataFetchMode "single") as well, things start to fall apart.
I can get the first level of data displayed. However when I try to expand, it doesn't show the children.
It seems that the problem lies in how getDrawArea() (ISC_Grids.js:5527) of the treegrid body determines the draw area in case of mulitlink.
getDrawArea() calls getTotalRows() (ISC_Grids.js:58299), which calls this.data.getLength() (ISC_DataBinding.js 59380), which invokes Super (ISC_Core.js:40873). This calls _getCachedNodeLength(this.root), which in turn calls _getCachedNodeLengthFromIndex(node, path) (ISC_Core.js:36396). This returns entry.paths[path].nodeLength;
Since it always checks against the nodeLength of the root node, it seems it will always just return the number of records directly under the root node.
I had to modify the __add function of the ResultTree because it tried to _incrementRecursionCount, _decrementRecursionCount and _getRecustionCount failed without explicitely specifying the path. The _assert parent == root failed for nodes not in root.
I'm not sure if I'm not populating the data correctly, or that the multilink is not working with loadDataOnDemand? Is there more in depth documentation on multilink trees?
Comment