I am not quite sure what I am doing wrong, but for some reason TreeGrid.fetchData is producing 3 fetch requests.
invoking fetchData results in the following requests
The datasource is a custom datasource, and I am unsure what the last two requests being generated are for exactly? They seem unnecessary, as the first request has not yet returned any results, and the last two do not provide start and end rows. What am I missing here, as datasource ends up sending the entire top level to the last two requests which is exactly what I am trying to avoid.
Code:
public class ArchiveTree extends TreeGrid { public ArchiveTree() { setShowConnectors(true); setLeaveSelectionCheckboxGap(false); setHeight(269); setSelectionType(SelectionStyle.SIMPLE); setSelectionAppearance(SelectionAppearance.CHECKBOX); Tree tree = new Tree(); tree.setModelType(TreeModelType.PARENT); tree.setIdField("absolutePath"); tree.setParentIdField("parent"); tree.setIsFolderProperty("directory"); tree.setShowRoot(false); tree.setDefaultIsFolder(true); setDataProperties(tree); TreeGridField name = new TreeGridField("name", "Archive"); TreeGridField size = new TreeGridField("size", "Size"); setFields(name, size); if(DataSources.MISSION_ARCHIVE != null) setDataSource(DataSources.MISSION_ARCHIVE); setLoadDataOnDemand(true); setTreeRootValue("/data/missions/"); setDataFetchMode(FetchMode.PAGED); } }
Code:
{ dataSource:"missionArchive", operationType:"fetch", componentId:"isc_ArchiveTree_0", data:{ parent:"/data/missions/" }, startRow:0, endRow:75, textMatchStyle:"exact", resultTree:[ResultTree ID:isc_ResultTree_0 (dataSource: missionArchive, created by: isc_ArchiveTree_0)], callback:{ caller:[ResultTree ID:isc_ResultTree_0 (dataSource: missionArchive, created by: isc_ArchiveTree_0)], methodName:"loadChildrenReply" }, willHandleError:true, showPrompt:true, prompt:"Finding Records that match your criteria...", oldValues:{ parent:"/data/missions/" }, requestId:"missionArchive$6278", internalClientContext:{ parentNode:{ absolutePath:"/data/missions/", children:[ResultSet ID:isc_ResultSet_9(dataSource: missionArchive, created directly)], childCount:190, directory:true }, relationship:{ childDS:[DataSource ID:missionArchive], parentDS:[DataSource ID:missionArchive], parentIdField:"parent", idField:"absolutePath" }, childrenReplyCallback:{ }, fetchCount:1 }, fallbackToEval:false, dataFetchMode:"paged", lastClientEventThreadCode:"XRP3", bypassCache:true }
Code:
{ dataSource:"missionArchive", operationType:"fetch", componentId:"isc_ArchiveTree_0", data:{ parent:"/data/missions/" }, textMatchStyle:"exact", resultTree:[ResultTree ID:isc_ResultTree_0 (dataSource: missionArchive, created by: isc_ArchiveTree_0)], callback:{ caller:[ResultTree ID:isc_ResultTree_0 (dataSource: missionArchive, created by: isc_ArchiveTree_0)], methodName:"loadChildrenReply" }, willHandleError:true, showPrompt:true, prompt:"Finding Records that match your criteria...", oldValues:{ parent:"/data/missions/" }, requestId:"missionArchive$6279", internalClientContext:{ parentNode:{ absolutePath:"/data/missions/", children:[ResultSet ID:isc_ResultSet_9(dataSource: missionArchive, created directly)], childCount:190, directory:true }, relationship:{ childDS:[DataSource ID:missionArchive], parentDS:[DataSource ID:missionArchive], parentIdField:"parent", idField:"absolutePath" }, childrenReplyCallback:{ }, fetchCount:2 }, fallbackToEval:false, dataFetchMode:"paged", lastClientEventThreadCode:"XRP3", bypassCache:true }
Code:
{ dataSource:"missionArchive", operationType:"fetch", componentId:"isc_ArchiveTree_0", data:{ parent:"/data/missions/" }, textMatchStyle:"exact", resultTree:[ResultTree ID:isc_ResultTree_0 (dataSource: missionArchive, created by: isc_ArchiveTree_0)], callback:{ caller:[ResultTree ID:isc_ResultTree_0 (dataSource: missionArchive, created by: isc_ArchiveTree_0)], methodName:"loadChildrenReply" }, willHandleError:true, showPrompt:true, prompt:"Finding Records that match your criteria...", oldValues:{ parent:"/data/missions/" }, requestId:"missionArchive$62710", internalClientContext:{ parentNode:{ absolutePath:"/data/missions/", children:[ResultSet ID:isc_ResultSet_9(dataSource: missionArchive, created directly)], childCount:190, directory:true }, relationship:{ childDS:[DataSource ID:missionArchive], parentDS:[DataSource ID:missionArchive], parentIdField:"parent", idField:"absolutePath" }, childrenReplyCallback:{ }, fetchCount:3 }, fallbackToEval:false, dataFetchMode:"paged", lastClientEventThreadCode:"TMR4", bypassCache:true }
Comment