[Dojo-interest] dijit.tree - any alternatives?

Ian Briscoe ijbriscoe at googlemail.com
Mon Aug 9 07:33:05 EDT 2010

Hi Simon,

Just tried what you suggested, and you're right. Calling setItem triggers
the notification response required to update the tree, and visually, it's
perfect - no clunky redrawing; the deleted node is removed from the tree

I need to do more tests, particularly insert and update, but it looks

I'm not sure how this would work if ClientFilter had been included - would
the fetch still go to the web service, or would it check the cache first? If
so, the problem would be how to force an update of the cache.  I don't need
caching right now, but I'm sure others would, and I might!



On 6 August 2010 20:24, Ian Briscoe <ijbriscoe at googlemail.com> wrote:

> Hi Simon,
> I'll give this a go when I get back on my project.  However, there are
> other issues, such as how to customize the query string of a request made by
> the JsonRestStore - see earlier posts in thread.  I issue an xhrDelete in
> order to do what I need, and that leaves me with a big store update problem
> in order to refresh the part of the tree affected by the delete.
> All told, there are enough issues, and I've spent enough time, to figure
> that even if it takes me 2 weeks, I'll have less grief if I write my own
> custom solution.   It really goes against my better nature, but sometimes
> you have to cut your losses.
> In any case, I figure it'll be fun to learn how to write Dijits from
> scratch :-)  and I'll end up with something that does *exactly* what I need
> it to do, rather than forcing the existing dijits to behave how I'd like
> them to, which I suspect in this case to be impossible.
> Cheers,
> Ian.
> On 6 August 2010 19:35, Simon Speich <simon.speich at gmail.com> wrote:
>> I'm no dojo expert, but I have a hard time believing that your're right.
>> Wouldn't the following work? Use store.fetch to query a tree node and then
>> the onComplete() callback to set the children attribute to the data you
>> just
>> fetched (setValue will trigger the notification to update the tree), e.g.
>> // something like
>> this.store.fetch({
>>        query: 'someTreeNode',
>>        onComplete: dojo.hitch(this, function(item {
>>                this.store.setValue(item, 'children', 'newChildren');
>>                this.store.save();
>>        })
>> });
>> --
>> View this message in context:
>> http://dojo-toolkit.33424.n3.nabble.com/dijit-tree-any-alternatives-tp1029550p1031434.html
>> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://docs.dojocampus.org
>> Dojo-interest at mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20100809/fe2e6ec5/attachment.htm 

More information about the Dojo-interest mailing list