[dojo-contributors] Dojo data discussion

Bill Keese bill at dojotoolkit.org
Fri Jun 8 02:14:25 EDT 2007


Brian Douglas Skinner wrote:
> There's a getIdentity() method in the Identity API:
>   http://trac.dojotoolkit.org/browser/dojo/trunk/data/api/Identity.js
> 
> 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?

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?



More information about the dojo-contributors mailing list