[dojo-contributors] Dojo data discussion

Brian Douglas Skinner skinner at dojotoolkit.org
Fri Jun 8 14:01:26 EDT 2007

>> JsonItemStore provides support for getIdentity(), as does CsvStore.
> Great.   Do you think Combobox should be using this for the key 
> value, and (when getLabel() is implemented) use that too?

Yup, that sounds good.

Jared has already implemented getLabel() in JsonItemStore, so 
JsonItemStore should have everything you need.  In the unit tests 
there's a data file that serves as an example of how to specify item 
labels and item identifiers:

> For example, a native HTML <select> looks like:
> <select>
> 	<option value="AL">Alabama</option>
> 	<option value="AK">Alaska</option>
> 	<option value="AS">American Samoa</option>
> If we have a data store for the states then:
> store.getIdentity(item) --> returns "AL"
> and
> store.getLabel(item)  --> returns "Alabama"
> Does that make sense?

Yup, looks great to me.

:o) Brian

More information about the dojo-contributors mailing list