[CS-FSLUG] OT: Any Dojo Toolkit Users on Here?
Timothy Butler
tbutler at uninetsolutions.com
Fri Jun 17 21:27:59 CDT 2011
I'm stuck with a Dojo problem. I'm trying to create a lazy loading tree. To do so, I am trying to use dojox.data.QueryReadStore as the store for the lazy loading dijit.tree. I seem hard pressed to find examples of people using this store instead of dojox.data.JsonRestStore, but I would really like to stick to using query strings as opposed to REST syntax for the sake of consistency throughout my application. The trouble is, while I can get QueryReadStore to pass along the root level of the tree, lazy loading the children, it always fails.
Here's what I have:
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();
});
When I click to expand one of the categories that has children, I get this error from Firebug:
> 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:
http://asisaid.com/safari-resources/lazyLoad.html
Thoughts?
Thanks,
Tim
More information about the Christiansource
mailing list