Hi Jeff, I'm not sure what you meant by using e4x to get to the
sub-nodes - does that come in to play when I call the filterFunction ?

Also I'm still not sure if I'm following you right Alex, what I did was
change the dataDescriptor's getChildren() function to this :

 
------------------------------------------------------------------------\
-
     override public function getChildren(node:Object, model:Object =
null):ICollectionView
     {
         var childrenCollection:ICollectionView;
         var myCursor:IViewCursor;// = childrenCollection.createCursor();

         childrenCollection = super.getChildren(node, model);

         if(childrenCollection != null)
         {
             childrenCollection.filterFunction = ff_childrenCollection;
             childrenCollection.refresh();

         }

         return childrenCollection;
     }    // END OF getChildren()

     //
------------------------------------------------------------------------\
-

And my filterfunction looks like this :

     //
------------------------------------------------------------------------\
-
     //    ff_childrenCollection()
     //    filterfunction for the children of getChildren
     private function ff_childrenCollection(item:Object):Boolean
     {
         if(item.attribute("visibility") == '1')
         {
             return true;
         }

         return false;
     }    // END OF ff_childrenCollection()

     //
------------------------------------------------------------------------\
-

Now when I'm updating my list, the CPU jumps to 100%, so it sounds like
I'm in an endless loop. Plus the top level branches move around - for
example, I updated a child under a branch at the top of the list and the
branch moved down, 2 branches from the bottom. So before it would look
like this :

BEFORE
     Company
       |
       |-- Department 1
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 2
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 3
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 4
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 5
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Person
       |-- Person
       |-- etc..

AFTER :
     Company
       |
       |-- Department 2
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 3
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 1      << it moved here from the top
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 4
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Department 5
             |-- Person
             |-- Person
             |-- etc..
       |
       |-- Person
       |-- Person
       |-- etc..

Reply via email to