Ticket #5757 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

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

Reported by: benschell Owned by: jaredj
Priority: normal Milestone:
Component: DojoX Grid Version: 1.0
Severity: normal Keywords:
Cc:

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

Changed 6 months ago by jaredj

  • status changed from new to closed
  • resolution set to fixed

Updated the docs accordingly.

Note: See TracTickets for help on using tickets.