Loading ...
Sorry, an error occurred while loading the content.

TreeView removeNode AutoRefresh Question

Expand Messages
  • dlazar911
    I have a Node located as a child of my TreeView root object. The node was dynamically added to the tree. I call the function removeNode() with the node object
    Message 1 of 1 , Jul 10, 2006
    • 0 Attachment
      I have a Node located as a child of my TreeView root object. The node
      was dynamically added to the tree. I call the function removeNode()
      with the node object and the boolean true for autorefresh. I use
      Venkman to step through the removal process. The node is removed from
      the collection, but the problem lies in the autoRefresh. It is not
      called. This seems to be due to the setting of childrenRendered, from
      the removeNode function....


      // Refresh the parent of the parent
      if (autoRefresh && p && p.childrenRendered) {
      p.refresh();
      }


      autorefresh is true, p is true, but p.childrenRendered is always
      false, as set in the _deleteNode() function. I see childrenRendered is
      ONLY ever true once a call to completeRender() finishes. This is not
      called during removeNode() so I am curious as to how removeNode will
      ever respect the autoRefresh boolean? Any insight on how to best fix
      this problem without just calling p.refresh() based on autoRefresh
      setting, I am sure there was a reason for the check on childrenRendered...

      Thanks
    Your message has been successfully submitted and would be delivered to recipients shortly.