I m试图使用Dojox.data。 QueryReadStore是一家 la装的仓库。 树木。 我似乎难以找到使用该仓库的人而不是JsonRestStore的例子,但为了在我的整个申请中保持一致,我真的要坚持使用电梯而不是REST syntax。 问题在于,尽管我能够让QueryReadStore穿过树根层, la装孩子,但总是失败。
这里我要说的是:
dojo.require("dojox.data.QueryReadStore");
dojo.require("dijit.Tree");
dojo.addOnLoad(function() {
var store = new dojox.data.QueryReadStore({
url: /cgi-bin/safari/safari_json_responder.pl ,
requestMethod: "get"
});
var treeModel = new dijit.tree.ForestStoreModel({
store: store,
deferItemLoadingUntilExpand: true,
query: { id : "0" },
childrenAttrs: ["children"]
});
var myTree = new dijit.Tree({
model: treeModel
},
"treeOne");
myTree.startup();
});
在我点击扩大有子女的类别之一时,我从火焰中看到这一错误:
Node cannot be inserted at the specified point in the hierarchy" code: "3 [Break On This Error] (function(){var _1=null;if((_1||(typeo...setTimeout(dojo._loadInit,100);}})();
Any suggestions on what might be the issue? You can see the live test page here:
rel=“nofollow” http://asisaid.com/safari-resources/lazyLoad.html
www.un.org/Depts/DGACM/index_spanish.htm 最新意见 19-Jun-2011年:
我注意到,KeryReadStore似乎声称不完整。 也许称QueryReadStore能够处理zy装问题的乔文件是不正确的? 我曾试图取代QueryReadStore。 它是低温分解方法,但却没有能够表明其作用。 我试图寻找“债务”或“优惠”的属性,但似乎并没有奏效。
显然,我做了一些错误的事情。 尽管我感到有些how,但我还是认为我是正确的。 如果我可以通知模型,某一项物品的装满负荷,或许会按其应当(以及JsonRestStore)采取行动。
这里,当将id=0传送到服务器时,数据即为产出:
{"label":"name","identification":"id","items":[{"name":"Autobiographical","poid":"0","id":"3"},{"name":"Blogging","poid":"0","children":[{"name":"asisaid","id":"2","$ref":"2"},{"name":"blogware","id":"4","$ref":"4"}],"id":"1","$ref":"1"}, [...]
(为避免太长时间而中断)
我在这里和在试图制造不同东西时都投下了参考资料和数据(我确信,我在这个例子中太多了,但我却试图扔下一切,看看着什么 stick。
It originally looked like this for id=0:
{"label":"name","identification":"id","items":[{"name":"Autobiographical","poid":"0","id":"3"},{"name":"Blogging","poid":"0","children": "true","id":"1","$ref":"1"}, [...]
我也试图这样做:
{"label":"name","identification":"id","items":[{"name":"Autobiographical","poid":"0","id":"3"},{"name":"Blogging","poid":"0","children": [{"$ref":"2" },{"$ref":"4"}],"id":"1"}, [...]
None of these ideas (nor the same thing, but using "_reference" instead of "$ref" seems to do the trick.