Issue using a RequestMemory store for a dGrid tree

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue using a RequestMemory store for a dGrid tree

Harry Devine

I am trying to create a dGrid TreeGrid using a dstore/Tree store.  Both dGrid and dStore are 1.1.0.  I patterned my store after a previously working example that uses canned data.  This is my first attempt at using RequestMemory to gather the data.  Here's how I'm creating my store:

            var TreeMemory = declare([RequestMemory, TreeStore]);
            var logStore = new TreeMemory({target: "adminGetUserLogs.php", idProperty: 'id',
              getChildren: function(object) {
                console.log("getChildren: ", object);
                return this.root.filter({parent: this.getIdentity(object)});
              },
              mayHaveChildren: function(item) {
                console.log("mayHaveChildren: ", item);
                return 'hasChildren' in item;
              },
              getLabel: function(object) {
                console.log("getLabel: ", object);
                return object.name;
              }
            });

I'm getting the following error in my Chrome Debug console:

dojo.js:8047 TypeError: Cannot read property 'items' of null at eval (/dojo-utils/dstore/Request.js:138) at signalListener (dojo.js:7542) at signalWaiting (dojo.js:7533) at Deferred.resolve (dojo.js:7697) at signalDeferred (dojo.js:7586) at signalListener (dojo.js:7557) at signalWaiting (dojo.js:7533) at Deferred.resolve (dojo.js:7697) at signalDeferred (dojo.js:7586) at signalListener (dojo.js:7557) "TypeError: Cannot read property 'items' of null at eval (/dojo-utils/dstore/Request.js:138:24) at signalListener (http://192.168.56.101/dojoroot/dojo/dojo.js:7542:21) at signalWaiting (http://192.168.56.101/dojoroot/dojo/dojo.js:7533:4) at Deferred.resolve (http://192.168.56.101/dojoroot/dojo/dojo.js:7697:5) at signalDeferred (http://192.168.56.101/dojoroot/dojo/dojo.js:7586:15) at signalListener (http://192.168.56.101/dojoroot/dojo/dojo.js:7557:6) at signalWaiting (http://192.168.56.101/dojoroot/dojo/dojo.js:7533:4) at Deferred.resolve (http://192.168.56.101/dojoroot/dojo/dojo.js:7697:5) at signalDeferred (http://192.168.56.101/dojoroot/dojo/dojo.js:7586:15) at signalListener (http://192.168.56.101/dojoroot/dojo/dojo.js:7557:6)

Any ideas?

Thanks,

Harry


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest