[dojo-contributors] tree/dojo.data problems (nee: Re: [Dojo-interest] [ANN] Dojo 0.9 Final)

Jared Jurkiewicz jared.jurkiewicz at gmail.com
Mon Aug 20 22:44:32 EDT 2007

   It actually was tested.  I had demos set up in dojox.data that did
Tree against multiple store implementations to validate that Tree,
ComboBox, etc, all worked properly against a variety of store impls.
But that's nether here nor there, not will it change things now.  I
recommend that changes made like that are done more carefully in the
future and that when such changes are made, to do a grep across all of
dojo, dijit, and dojox, and for any references, verify said changes do
not break where the widget/whatever is being used.

  As for parent pointers ... ItemFileReadStore can do that today.
That's what the _reference type is for in the data file format.  You
give it a reference identifier to another item (or items) in the

-- Jared Jurkiewicz

On 8/20/07, Bill Keese <bill at dojotoolkit.org> wrote:
> Jared Jurkiewicz wrote:
> > Basically, it breaks dijit.Tree from working with any dojo.data
> > Datastore except for ItemFileReadStore.
> That's too bad, although not surprising. (In general things that haven't
> been tested don't work.)  I'm sure we'll find lots of other big problems
> too, but they'll all get fixed in the end.
> You can workaround by setting:
> <script>
> myStore._features = {};
> </script>
> As for the identity API, Tree doesn't assume the store implements
> getIdentity() but rather requires it, in the same way that Combobox
> requires that it's store support filtering queries like "ca*".  It's a
> subtle semantic difference.
> I'd like to agree w/Brian that all stores should implement getIdentity()
> but maybe some data just doesn't have an id column?   For any store
> where an id is possible to compute, I think you can make the store to
> support getIdentity() in your markup w/the script tag:
> <div dojoType="dojox.data.fooStore" ...>
>         <script type='dojo/method' event='getIdentity' args=item>
>                 return ... ;
>         </script>
> </div>
> If supporting getIdentity() is an issue that we could make sure the tree
> only requires getIdentity() if the store is also supporting the write API.
> By the way, I'm looking at making another demo now and I've realized
> that Tree won't really work for normal relational data where items have
> parent "pointers" rather than children lists.  IE:
> {type: "country", name: "united states", id: "US"},
> {type: "state", name: "california", id: "CA", parent: "US"}
> That seems like the biggest issue of all to me.  Any ideas?  It seems
> like we have to either modify the store to support getChildren() by
> doing a query for all nodes with a given parent, or change the way Tree
> works.
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors

More information about the dojo-contributors mailing list