My data grid is not loading the information from the store
The response I get from my REST call looks like this: {"onlineUsers":[],"offlineUsers":["123.456.7.890:8080"]}
This is what my code looks like:
require([ "dojo/store/JsonRest",
"dojo/store/Memory",
"dojo/store/Cache",
"dojox/grid/EnhancedGrid",
"dojox/grid/enhanced/plugins/Pagination",
"dojo/data/ObjectStore",
"dojo/dom-attr",
"dojo/domReady!"],
function(JsonRest, Memory, Cache, EnhancedGrid, Pagination, ObjectStore, domAttr){
var store = new dojo.store.JsonRest({target:"/Url/rest/onlineusers/all"});
var dataStore = new dojo.data.ObjectStore({objectStore: store});
var grid = new EnhancedGrid({
id: 'grid',
store: dataStore,
structure: [
{name: "Offline Users", field: "offlineUsers", width: "100px"}
]
}, "gridDiv");
grid.startup();
});
In the logs I see this message: [object Object]
I also notice this warning in the console: [18:12:57.822] Use of getAttributeNode() is deprecated. Use getAttribute() instead. @ http://ajax.googleapis.com/ajax/libs/dojo/1.8.4/dojo/dojo.js:146
What could be causing this issue?