Changes between Initial Version and Version 1 of Ticket #5536


Ignore:
Timestamp:
Jan 8, 2008, 5:22:34 PM (12 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5536 – Description

    initial v1  
    1 It's hard and impractical for Tree to tell if a new item or changed item should appear at the tree top level.
     1It's impractical for Tree to tell if a new item or changed item in the data store should appear at the tree top level.
    22
    33Assume a tree like
     
    1111"Root" is an optionally displayed node that doesn't correspond to any item in the data store.  The list of top* items is determined by Tree's query parameter.
    1212
    13 When a new item is added to the data store Treee no way of knowing if it matches the query or not, without rerunning the query.   It also doesn't know the sort order of the item, relative to it's siblings.
     13When a new item is added to the data store, Tree has no way of knowing if it matches the query or not, without rerunning the query.   It also doesn't know the sort order of the item, relative to it's siblings.
    1414
    15 Similarly, any change to an item's attributes could potentially make it become or alternately stop it from being a top level item in the tree, so we need to rerun the query in that case too.
     15Similarly, any change to an item's attributes could potentially change it's status, so we need to rerun the query in that case too.
     16
     17However, rerunning the query on every new or changed node is impractical because it's too slow.  Imagine a Tree of users and groups.   Since users are never top level elements in the tree, it's silly to rerun the query every time a new user is added.
    1618
    1719Since it's impractical for Tree to solve this problem, provide method for the user to notify the tree whenever the top level children have changed, by giving the new list of children.   Tree will compare the current list to the new list and add/delete nodes as necessary.
     20
     21Something like {{{ setTopLevelChildren( /* dojo.data.Item[] */ items  ); }}}