Hi Isomorphic,
I am hoping this is a simple question. We have usually loaded Trees in SmartClient using initialData first with it being set in the response from a struts action. When any node is expanded, we load on demand and send the request to our custom Java back-end datasource using transformRequest. In this case, I have some criteria and the criteria for the ancestorNode (the node clicked in the tree) automatically is changed, so by the time it reaches the server, we have the correct node ID.
All we have changed now is to call fetchData() (below) when the page loads instead of loading the data using the initialData property. But now, every time I try to expand a collapsed node, the ancestorNodeId in the dsRequest.data in transformRequest is always the rootId value.
I don't understand why this is the case. I looked at the Smart Client documentation and debugged the parentNode property in dsRequest when inside transformRequest, but it is always null. Is there a way to enable showing this so I can reset ancestorNodeId to the correct node in transformRequest?
I am hoping this is a simple question. We have usually loaded Trees in SmartClient using initialData first with it being set in the response from a struts action. When any node is expanded, we load on demand and send the request to our custom Java back-end datasource using transformRequest. In this case, I have some criteria and the criteria for the ancestorNode (the node clicked in the tree) automatically is changed, so by the time it reaches the server, we have the correct node ID.
Code:
dataSource: isc.addProperties(MyTreeDS, { transformRequest: function(dsRequest) { var params = { someProperty: <propVal> }; return isc.addProperties({}, dsRequest.data, params); } })
I don't understand why this is the case. I looked at the Smart Client documentation and debugged the parentNode property in dsRequest when inside transformRequest, but it is always null. Is there a way to enable showing this so I can reset ancestorNodeId to the correct node in transformRequest?
Code:
hierarchyTree.fetchData( null, hierarchyTreeCallback, { data: { includeRootNode: true, ancestorNodeId: <rootId> } });
Comment