Opened 11 years ago

Closed 11 years ago

#5757 closed defect (fixed)

Setting the store in the DojoData model should only be done in the constructor

Reported by: benschell Owned by: Jared Jurkiewicz
Priority: high Milestone:
Component: DojoX Grid Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

If the store is set via:

var newModel = new dojox.grid.data.DojoData();
newModel.store = myStore; 

problems will arise, as information about the store is setup during construction (attaching events, determining store capabilities, etc.). This same model should be created like so:

var newModel = new dojox.grid.data.DojoData({store: myStore});

This is only docs problem, and only occurs on one page. This should be changed so that users don't start setting the store directly, then running into notification, writing, and identity-fetching issues later.

http://www.dojotoolkit.org/book/dojo-book-0-9-1-0/part-2-dijit-dojo-widget-library/advanced-editing-and-display/grid-1-0/sortin

This page should be changed to something like:

var newModel = new dojox.grid.data.DojoData({rowsPerPage: 20, store: myStore, query: {type: someOtherType}, clientSort: true});
myGrid.setModel(newModel);
// Remember to call newModel.destroy() when you're done.

Change History (1)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

Updated the docs accordingly.

Note: See TracTickets for help on using tickets.