HZGN.COM
welcome to my space
X
Welcome to:hzgn.com
Search:  
NAVIGATION: Home >>
recursive delete treenodes /asynctreenode
Published by: webmaster 2009-01-07

  • Hi,

    I have made a recursive delete option for the asynctreenodes. Why i made this function is simple. I want when a node is collapsed all the nodes are deleted and when expanded again i want to load the content again. So that changes in the tree are reloaded again. I tried to use the reload method but this resulted in a infinite loop :(, I don't know if this is the right way but give me your feedback and maybe it is in any use for you.


    var Tree = Ext.tree;

    var tree = new Tree.TreePanel('treePanel', {
    animate:true,
    loader: new Tree.TreeLoader({dataUrl:'http://www.somewhere.where/your/feed/is'}),
    TreeNodeListener(Adapter).onClick - GWT-Ext Developer Forum ::
    5 posts - Last post: Apr 29, 2008The TreeNode to which the onclick is attached is . I've made a sample with a XMLtreeloader and recursive method to assign
    http://groups.google.com/group/gwt-ext/browse_thread/thread/895027cf17136ad7
    HOME
    enableDD:false,
    containerScroll: false,
    Index: app/Mage.php ::
    AsyncTreeNode(editingCategoryBreadcrumbs[editingCategoryBreadcrumbs.length dirsFirst) { + // collect all the stuff recursively + foreach ($_result as
    http://www.magentocommerce.com/support/1.1.5-1.1.6.diff
    HOME
    Bug - reload method of AsyncTreeNode - Ext JS Forums::
    recursive delete treenodes /asynctreenode, sylexer, Ext: Examples and Extras, 3, 03-18-2007 04:03 PM. Tree with AsyncTreeNode, Animal, Ext: Help
    http://www.yui-ext.net/forum/showthread.php?t=2685
    HOME


    removeAllChildrenNode : function(node)
    {
    for(var i = node.childNodes.length -1; i >= 0; i--)
    {
    if (node.childNodes[i].leaf != true)
    {
    this.removeAllChildrenNode( node.childNodes[i] )
    }
    node.removeChild( node.childNodes[i] );
    }
    }
    });


    tree.on('collapse', function (node){
    node.loaded = false;
    this.removeAllChildrenNode( node );
    });

    greetz
    Mike


  • The right way is to use reload().

    And if it causes an infinite loop, then it's either an Ext bug, or your bug.

    You could try stepping through reload and seeing what it's doing. It looks quite simple really:


    reload : function(callback){
    this.collapse(false, false);
    while(this.firstChild){
    this.removeChild(this.firstChild);
    }
    this.childrenRendered = false;
    this.loaded = false;
    if(this.isHiddenRoot()){
    this.expanded = false;
    }
    this.expand(false, false, callback);
    }


    It removes all children (recursion not necessary - the child nodes of the child nodes are just abandoned), and clears the childrenRendered and loaded flags. What could go wrong?

    Does the loop occur when it attempts to re-expand (and therefore reload) the node?


  • When i say reload on the onexpand event it keeps on reloading. Because the reload function keeps on calling the expand event. Thats why it goes into a infinitive loop. And thats why i came with this solution.


  • You have a listener on the "expand" event of the tree which calls reload?





  • Red Hat's Rough Recovery From CFO Exit
    Windows Live Finds a New, Pre-installed Home

    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about recursive delete treenodes /asynctreenode , Please add it free.
  • travel geography
  • computer arithmetic
  • home sitting agencies in bay area california
  • pcl3 printer codes
  • rare jfk photo found day of assassination
  • what is the space medicine and why it is important
  • sea food market israel
  • magnet manufactures
  • intersection
  • custom tile custom mosaic tile from an image
  • companies that can provide an online store
  • civil wedding ceremony in ontario canada
  • growth of connexions between neurons in human central nervous system
  • samsung 1363 hard disk drive
  • percipation recorded
  • downloadable powerpoint on networking basics
  • automobile wheel balancing equipment
  • match a floor tile
  • definition and how to prepare a diffusion index
  • goldfish breathing
  • colorado creative music company with darren curtis skanson
  • london walk in medical centres doctors practices
  • importing goods from brazil us customs duties
  • eugene fauntleroy cordell
  • sister mary joseph nodule
  • math business statistics question
  • food where can i find aji amarillo
  • About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008hzgn.com All Rights Reserved