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

Bill Keese bill at dojotoolkit.org
Mon Aug 20 23:21:55 EDT 2007


Jared Jurkiewicz wrote:

>   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
> store.
> 

Hmm, you'll have to show me.  The examples I found use _reference to 
point to children:

      { name:'Asia', type:'continent',
          children:[{_reference:'China'}, {_reference:'India'}, 
{_reference:'Russia'}, {_reference:'Mongolia'}] },


rather than to point to the parent.

Obviously you could use reference to point to the parent, but the 
problem is, how do I make store.getValues(asia, "children") return the 
list of children when that information isn't stored in the asia item?  IE:

{ name:'Asia', type:'continent' },
{ name: 'China', type: 'country', parent: {_reference: 'Asia'} }
{ name: 'India', type: 'country', parent: {_reference: 'Asia'} }
...



> 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.

Yup, sorry about that.  We can try to remember to check dojox demos when 
changing dijits (we should do that anyway but it's easy to forget), or 
we can reference the dojox data stores from the dijit tests... not sure 
what makes sense.






More information about the dojo-contributors mailing list