Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Paged TreeGrid blocks other server-requests completely

    Hi there,

    I'm implementing paged treegrids, but there seems to be a issue after loading the datasource multiple times.
    If you open several nodes and scroll in the listgrid other requests through the RPCManager are not sent. The user can continue to select multiple items, but if the user is trying to start a server-event (for example to change the view), the whole smartclient seems to be freezed.

    Here you can see an example:


    I used a similar example as in this thread.
    Despite the fact that the same example was used, i assume there is a other basic issue, therefore i opened a new thread.

    It's reproducable with Firefox 37.0.1 and Chrome Version 41.0.2272.118 m with the latest nightly SmartClient_v100p_2015-04-12_Pro.

    I think this is a major issue, which blocks the usage of the whole paged-feature of treegrids. By now I'm starting to worry a little bit why i'm the only one, who reports issues on the paged treegrid.
    Is something basically wrong with the paged-treegrid so nobody uses this? I think this should have been discovered earlier if anyone has used the paged datasource, or is my example such a weird use-case? Just asking.

    Here is the Code to reproduce:
    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" : "2531",
    						"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"
    			},
    			"autoFetchData" : true,
    			"dataPageSize" : 20,
    			"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
    				}
    			],
    			"selectionProperty" : "isSelected",
    			"members" :
    			[]
    		}),
    		isc.ToolStrip.create({
    			"width" : "100%",
    			"bottom" : 0,
    			"hideUsingDisplayNone" : false,
    			"layoutLeftMargin" : 3,
    			"layoutRightMargin" : 3,
    			"leaveScrollbarGap" : false,
    			"members" :
    			[isc.Button.create({
    					"click" : function () {
    						var theResult = "isc.showMessage('sucessful');";
    						isc.RPCManager.sendRequest({
    							actionURL : "http://crossorigin.me/http://jsfiddle.net/echo/js/",
    							httpMethod : "GET",
    							params : {
    								"js" : theResult
    							},
    							useSimpleHttp : true,
    							callback : function (rpcResponse, jsondata, rpcRequest) {
    								if (rpcResponse.status !== 0) {
    									console.log(failed)
    								} else {
    									eval(jsondata);
    									isc.clearPrompt();
    								}
    							}
    						});
    					},
    					"title" : "Make a server-request",
    					"hiliteAccessKey" : true,
    					"width": "200",
    					"showDisabledIcon" : false
    				})]
    		})
    	]
    });
    function requestTransformer(dataSourceRequest) {
    	var operationType = {
    		operationType : dataSourceRequest.operationType
    	};
    	if (dataSourceRequest.operationType == "fetch") {
    		var params = {
    			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;
    	};
    }
    Best

    #2
    This has been fixed for SC 9.1p and newer and will be available in today's nightly builds (dated 4-14-2015).

    Comment


      #3
      thanks for the fast fix.
      It's confirmed for the latest nightly SmartClient_v100p_2015-04-15_Pro.

      Best regards

      Comment

      Working...
      X