[dojo-contributors] dijit.Tree assumes datastore implements Identity API

Bill Keese bill at dojotoolkit.org
Tue Aug 21 16:44:04 EDT 2007


Brian Douglas Skinner wrote:

> I think a datastore can probably always just make up a unique id for 
> each item, even if there's no unique id embedded in the data itself. 
> For example, a .csv file won't necessarily have an id column in the file 
> itself, but our dojox.data.CsvStore still provides a getIdentity() 
> implementation by just returning the row number of the item in the file.

The issue is for data stores that involve a server.  Maybe there's some 
server interface that doesn't provide ids?  I guess for google you can 
use the URL as the ID and for Flickr there's probably an id, but for an 
arbitrary server, if you do some query like

getData.php?attr1=foo

and then it returns a list of item without id's, you're stuck.  I'm not 
sure if that would ever happen in real life though?



More information about the dojo-contributors mailing list