Results 1 to 3 of 3

Thread: Reloading a tree

  1. #1
    Sencha User farion's Avatar
    Join Date
    Feb 2008
    Location
    Karlsruhe, Germany
    Posts
    75
    Answers
    1
    Vote Rating
    10
      0  

    Default Reloading a tree

    Hello,

    I want to reload a tree from an ajax-source. I've already done this in 3.x. But in 4.0 it seems to be more complicate and confusing to me.

    I already tried:
    Code:
    tree.getStore().load()
    //or
    tree.getStore().load({node: node})
    This reloads the complete tree or the given node. But also all child nodes will be collapsed after that, no matter of the state before.

    I also read about the stateful flag. But I think it is the wrong way, cause - according to the doc - there is no logic implemented.

    How can I reload a single node without affecting the state of the child nodes? Or how can I save the expand/collapse state and restore it after the reload?

    Thank you for helping
    farion

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    You are reloading a node which will delete all child nodes so to reexpand it you will need to get what is expanded and expand it after the node is loaded.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User farion's Avatar
    Join Date
    Feb 2008
    Location
    Karlsruhe, Germany
    Posts
    75
    Answers
    1
    Vote Rating
    10
      0  

    Default

    Yes, that was my question

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •