1. #1
    Ext GWT Premium Member
    Join Date
    Sep 2010
    Location
    Odense, Dk
    Posts
    4
    Vote Rating
    0
    marcio.mnz is on a distinguished road

      0  

    Default TreeGrid Loader hasChildren() 2.2.0

    TreeGrid Loader hasChildren() 2.2.0


    Hi,
    I use an assync TreeGrid and it used to work perfectly before the 2.2.0 version.

    I overrided the TreeLoader.hasChilren() to decide if some node is leaf or not independently of it has children or not in the database, so far so good.
    In the 2.2.0 version, this behavior is not been assumed anymore. After the node gets the "loaded" state and if this node doesn't have any child, it is considered leaf, independent of the Loader.hasChildren() logic. You can reproduce this by collapsing the parent folder and expanding it again.

    Checking the differences between the 2 versions, I could find the possible reason. The TreeNode constructor had its behavior changed.

    Version 2.1.1
    Code:
    public TreeNode(String id, M m) {
          this.id = id;
          this.m = m;
          if (loader != null && !loaded) {
            leaf = !loader.hasChildren(m);
          }
        }
    Version 2.2.0
    Code:
    public TreeNode(String id, M m) {
          this.id = id;
          this.m = m;
        }
    As you can see, the leaf boolean property is not been loaded anymore. Is it really correct? If yes, how should I work around it if I don' t want ext decides if some node of mine is leaf or not?
    Last edited by marcio.mnz; 17 Sep 2010 at 4:16 AM. Reason: make it more clear

  2. #2
    Ext GWT Premium Member
    Join Date
    Sep 2010
    Location
    Odense, Dk
    Posts
    4
    Vote Rating
    0
    marcio.mnz is on a distinguished road

      0  

    Default


    Answer from the support team:

    "TreeGrid was changed to be exactly the same than TreePanel. The loader gets only asked if the node is not loaded. You will also need to override the TreeGrid hasChildren method."

Similar Threads

  1. When do call method 'public boolean hasChildren' ?
    By yh800701 in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 8 Apr 2010, 12:08 AM
  2. Replies: 8
    Last Post: 24 Feb 2010, 11:55 PM
  3. TreeGrid - Loader question
    By sbuemaint in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 27 Jan 2010, 3:16 PM
  4. Replies: 1
    Last Post: 26 Aug 2009, 10:54 AM
  5. Replies: 1
    Last Post: 20 Jan 2009, 6:42 PM

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar