Thank you very much for almost real-time responses. You guys are superb at that.
OK. I changed my code to
isc.RestDataSource.create({
ID:"articles",
fields:[
{name: "text", type: "string"},
{name: "articleID", type: "integer", primaryKey:true},
{name: "parentArticleID", type: "integer", foreignKey: "articleID"}
],
//fetchDataURL:"/inno/loadAllArticles.jsp"
//dataFormat: "json", dataURL : "treetest_json_parentsonly.htm"
dataFormat: "custom", dataURL : "treetest_json_parentsonly.htm",
transformReponse: function(dsResponse, dsRequest, xmlData) {
// console.warn("dsResponse is " + dsResponse.data);
// console.warn("xmlData is " + xmlData);
return dsResponse.data;
}
});
The .htm URL now returns only data like RoR would.
However, i get the following error in Firebug/Firefox. In Console, all I get is
21:00:14.015:XRP2:WARN:Log:TypeError: _3.selectString is not a function
Any ideas why I am not ‘catching’ the data right? thanks.
_3.selectString is not a function
transformResponse(Object, Object operationType=fetch dataSource=articles data=Object, "{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...")ISC_DataBinding.j... (line 658)
38b("{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...", Object, Object operationType=fetch dataSource=articles data=Object, Object operationId=articles_fetch clientContext=Object, Object operationType=fetch dataSource=articles)ISC_DataBinding.j... (line 263)
50e(Object operationId=articles_fetch clientContext=Object, "{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...", Object operationType=fetch dataSource=articles)ISC_DataBinding.j... (line 187)
getInstanceProperty(Object target=[RestDataSource ID:articles], "rpcResponse,data,rpcRequest", [Object operationId=articles_fetch clientContext=Object, "{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...", Object operationType=fetch dataSource=articles], [RestDataSource ID:articles] ns=Object ID=articles fields=Object, undefined)ISC_Core.js (line 163)
convertToMethod(Object target=[RestDataSource ID:articles], "rpcResponse,data,rpcRequest", [Object operationId=articles_fetch clientContext=Object, "{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...", Object operationType=fetch dataSource=articles], undefined)ISC_Core.js (line 208)
fireReplyCallback(Object target=[RestDataSource ID:articles], Object operationType=fetch dataSource=articles, Object operationId=articles_fetch clientContext=Object, "{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...")ISC_DataBinding.j... (line 445)
fireReplyCallback(Object operationType=fetch dataSource=articles, Object operationId=articles_fetch clientContext=Object)ISC_DataBinding.j... (line 445)
performOperationReply(Object operationType=fetch dataSource=articles, Object operationId=articles_fetch clientContext=Object)ISC_DataBinding.j... (line 445)
responseRequiresLogin(11)ISC_DataBinding.j... (line 443)
performTransactionReply(11, "{\r\n text:"Folder 1",\r\n articleID: 1,\r\n parentArticleID: null\r\n},\r\n{\r\n text:"Folder 2",\r\n artic...", undefined)ISC_DataBinding.j... (line 436)
aq(11, XMLHttpRequest, undefined)ISC_Core.js (line 32)
getInstanceProperty("isc.RPCManager.performTransactionReply(transactionNum,results,wd)", "transactionNum,results,wd", [11, XMLHttpRequest], Window inno.htm, undefined)ISC_Core.js (line 163)
performXmlTransactionReply(11, XMLHttpRequest)ISC_Core.js (line 545)
aq(XMLHttpRequest)ISC_Core.js (line 32)
getInstanceProperty("isc.Comm.performXmlTransactionReply(11, xmlHttpRequest)", "xmlHttpRequest", [XMLHttpRequest], Window inno.htm, true)ISC_Core.js (line 163)
h0(XMLHttpRequest, "isc.Comm.performXmlTransactionReply(11, xmlHttpRequest)")ISC_Core.js (line 528)
_12()ISC_Core.js (line 534)
[Break on this error] if(_4.totalRows!=null)_1.totalRows=_4.totalRows;if(_4.startRow!=null)_1.startRow...