Hi,
Working with the paged tree-databinding i have discovered three more issues.
Because they are different to the last few bugs(http://forums.smartclient.com/showthread.php?t=32566,http://forums.smartclient.com/showthread.php?t=32651) i post them into a this thread insted of "reopening" the old.
1. If you open the example below you can see, that the datasource returns open folders. This is important for this example.
At the beginning it's clear that the treegrid has to load the children of the root-node. After that the Treegrid has to load the childs of the of the "root-x" nodes. At this point i'm wondering, why the end-parameter is counting down, even if i have set the dataFetchSize to 50.
Sure i can ignore the given end-parameter at the server-side and could return all children instead, but i think this should be set right at the request.
2. Maybe you have already noticed the newly-added delay parameter to my extended exampe of the other posts ;-). The paged databinding of the tree makes imho only sense with large trees. Therefore it is possible that the latency of the server are not the same as localhost. So i have set a "delay" parameter to simulate server-workload. In the example below i have set it to 50 ms.
The result of a slight delay on the server is that after the call of all "root-x" nodes there comes a second bunch of load to the backend.
I wasn't able to reproduce this properly, but at testing this out it was reproducable in 1 of 5 times. Often there is no additional request, sometimes only 1 additional request and sometimes there are - like in the code-block - 5 additional requests. edit: It is also reproducable without the delay-parameter.
3. In our TreeGrid we have a few cells which needs to be in two lines. So we have set "fixedRecordHeights: false". It's clear to me that working with this attribute and DataBindings can result in struggeling while jumping in the Grid (for example scrollToRow in ListGrids). In the ListGrid there is no problem if you have set "fixedRecordHeights: false", but only work with records which have only 1 line in each field.
In the TreeGrid there seems to be a scrolling issue, if you set the "fixedRecordHeights: false" and begin to scroll with the mouse-wheel. If you start scrolling, the nodes at the bottom will get rendered, but at the top you can see the nodes are jumping up again. The same thing happens if you are at the bottom and scroll upwards.
.
Note to this gif: I was only scrolling down with the mouse-wheel. The jumping back up again is the issue described here.
All three issues are reproducable with the latest nightly from SmartClient_v100p_2015-04-22_Pro.
Issue 1 and 3 i could reproduce in all current versions from Chrome, Firefox and IE.
Issue 2 i could reproduce in Chrome and IE, maybe Firefox, but it was too bring to click F5 dozen of times.
This is the code, with which i could reproduce all 3 issues:
Best regards
Working with the paged tree-databinding i have discovered three more issues.
Because they are different to the last few bugs(http://forums.smartclient.com/showthread.php?t=32566,http://forums.smartclient.com/showthread.php?t=32651) i post them into a this thread insted of "reopening" the old.
1. If you open the example below you can see, that the datasource returns open folders. This is important for this example.
At the beginning it's clear that the treegrid has to load the children of the root-node. After that the Treegrid has to load the childs of the of the "root-x" nodes. At this point i'm wondering, why the end-parameter is counting down, even if i have set the dataFetchSize to 50.
Sure i can ignore the given end-parameter at the server-side and could return all children instead, but i think this should be set right at the request.
Code:
treegrid.php?operationType=fetch&parentId=root-1&delay=50&sortBy=null&start=0&end=14 treegrid.php?operationType=fetch&parentId=root-2&delay=50&sortBy=null&start=0&end=13 treegrid.php?operationType=fetch&parentId=root-3&delay=50&sortBy=null&start=0&end=12 treegrid.php?operationType=fetch&parentId=root-4&delay=50&sortBy=null&start=0&end=11 treegrid.php?operationType=fetch&parentId=root-5&delay=50&sortBy=null&start=0&end=10
The result of a slight delay on the server is that after the call of all "root-x" nodes there comes a second bunch of load to the backend.
Code:
treegrid.php?operationType=fetch&parentId=root-1&delay=50&sortBy=null&start=0&end=14 treegrid.php?operationType=fetch&parentId=root-2&delay=50&sortBy=null&start=0&end=13 treegrid.php?operationType=fetch&parentId=root-3&delay=50&sortBy=null&start=0&end=12 treegrid.php?operationType=fetch&parentId=root-4&delay=50&sortBy=null&start=0&end=11 treegrid.php?operationType=fetch&parentId=root-5&delay=50&sortBy=null&start=0&end=10 ... treegrid.php?operationType=fetch&parentId=root-13&delay=50&sortBy=null&start=0&end=2 treegrid.php?operationType=fetch&parentId=root-14&delay=50&sortBy=null&start=0&end=1 treegrid.php?operationType=fetch&parentId=root-1&delay=50&sortBy=null&start=0&end=27 treegrid.php?operationType=fetch&parentId=root-3&delay=50&sortBy=null&start=0&end=13 treegrid.php?operationType=fetch&parentId=root-4&delay=50&sortBy=null&start=0&end=12 treegrid.php?operationType=fetch&parentId=root-5&delay=50&sortBy=null&start=0&end=11 treegrid.php?operationType=fetch&parentId=root-6&delay=50&sortBy=null&start=9&end=59
3. In our TreeGrid we have a few cells which needs to be in two lines. So we have set "fixedRecordHeights: false". It's clear to me that working with this attribute and DataBindings can result in struggeling while jumping in the Grid (for example scrollToRow in ListGrids). In the ListGrid there is no problem if you have set "fixedRecordHeights: false", but only work with records which have only 1 line in each field.
In the TreeGrid there seems to be a scrolling issue, if you set the "fixedRecordHeights: false" and begin to scroll with the mouse-wheel. If you start scrolling, the nodes at the bottom will get rendered, but at the top you can see the nodes are jumping up again. The same thing happens if you are at the bottom and scroll upwards.
.
Note to this gif: I was only scrolling down with the mouse-wheel. The jumping back up again is the issue described here.
All three issues are reproducable with the latest nightly from SmartClient_v100p_2015-04-22_Pro.
Issue 1 and 3 i could reproduce in all current versions from Chrome, Firefox and IE.
Issue 2 i could reproduce in Chrome and IE, maybe Firefox, but it was too bring to click F5 dozen of times.
This is the code, with which i could reproduce all 3 issues:
Code:
isc.VLayout.create({ "ID" : "rootLayout_5", "width" : "100%", "height" : "100%", "autoDraw" : true, "hideUsingDisplayNone" : false, "leaveScrollbarGap" : false, "members" : [ isc.TreeGrid.create({ "ID" : "theTreeGrid", "width" : "100%", "height" : "100%", "selectionType" : "multiple", "canEdit" : false, "showFilterEditor" : false, dataSource : isc.DataSource.create({ "fields" : [{ "name" : "treeGridGeneratedIndex", "primaryKey" : true, "hidden" : true, "canView" : false }, { "name" : "nameField", "title" : "Reason", "type" : "text" }, { "name" : "parentId", "rootValue" : "root", "foreignKey" : "treeGridGeneratedIndex", "hidden" : true } ], "dataFormat" : "json", "dataURL" : "http://devset.de/treegrid.php", "transformRequest" : requestTransformer, "transformResponse" : responseTransformer, "recordXPath" : "\/resultData", useHttpProxy : false }), dataProperties : { openProperty : "isOpen", childrenProperty : "children", canReturnOpenFolders: true }, "fixedRecordHeights" : false, "autoFetchData" : true, "dataPageSize" : 50, "dataFetchMode" : "paged", "selectionProperty" : "isSelected", "fields" : [{ "name" : "nameField", "title" : "Reason", "type" : "text", "canEdit" : true, "canSort" : true }, { "name" : "lastField", "title" : "Name", "type" : "text", "canEdit" : true, "canSort" : true }, { "name" : "randomField", "title" : "random", "type" : "text", "canEdit" : true, "canSort" : true } ], "selectionProperty" : "isSelected", "members" : [] }) ] }); function requestTransformer(dataSourceRequest) { var operationType = { operationType : dataSourceRequest.operationType }; if (dataSourceRequest.operationType == "fetch") { var params = { delay: 50, sortBy : dataSourceRequest.sortBy, start : dataSourceRequest.startRow, end : dataSourceRequest.endRow }; } return isc.addProperties({}, operationType, dataSourceRequest.data, params); } function responseTransformer(dataSourceResponse, dataSourceRequest, jsonData) { if (dataSourceRequest.operationType == "fetch") { dataSourceResponse.totalRows = jsonData.totalRows; dataSourceResponse.endRow = jsonData.endRow; dataSourceResponse.startRow = jsonData.startRow; }; }
Comment