1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    8
    Vote Rating
    0
    pietromenea is on a distinguished road

      0  

    Default TreeView manual load

    TreeView manual load


    Hi ,
    when I try to manually load a node from an array the expanding animation is broke and the scroll is not visible,
    this is a quick example:


    Code:
    TreeSelector = Ext.extend(Ext.Window, {
                title: 'Tree Selector',
                width: 277,
                height: 321,
                layout: 'fit',
                padding: 5,
                initComponent: function() {
                    this.items = [
                {
                    xtype: 'treepanel',
                    title: '',
                    id: 'TreeSelectorControl',
                    rootVisible: false,
                    containerScroll: true,
                    root: {
                        text: 'Root Node'
                    },
                    loader: {
                    preloadChildren: true
                }
            }
            ];
                    this.fbar = {
                        xtype: 'toolbar',
                        items: [
                    {
                        xtype: 'button',
                        text: 'Close',
                        id: 'cmdClose'
                    }
                ]
                    };
                    TreeSelector.superclass.initComponent.call(this);
                }
            });
    
    
            Ext.onReady(function() {
                var myWin = new TreeSelector();
                myWin.on('show', function() {
                    var children = [
                                {
                                    "text": "Mansfield - Lahm",
                                    "UniqueId": "09039706118,AWIXK*P+",
                                    "ClassUniqueId": "Network",
                                    "leaf": false,
                                    "children": [
                                        {
                                            "text": "APRON",
                                            "UniqueId": "090397061`1U[DIM<3]^",
                                            "ClassUniqueId": "Branch",
                                            "leaf": false,
                                            "children": [
                                                {
                                                    "text": "A (FBO)",
                                                    "UniqueId": "0903970614.P<`,DZY/0",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "B",
                                                    "UniqueId": "090397061`_.X53]`8E`",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "C1 (term)",
                                                    "UniqueId": "090397061?$$8&=O6\\_=",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "C2",
                                                    "UniqueId": "090397061VF,@FY+$CSO",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "C3",
                                                    "UniqueId": "090397061=Q),W(2Y:_K",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                }
                                            ]
                                        },
                                        {
                                            "text": "RUNUP AREA",
                                            "UniqueId": "090397061V>5OX[LWNZ#",
                                            "ClassUniqueId": "Branch",
                                            "leaf": false,
                                            "children": [
                                                {
                                                    "text": "14",
                                                    "UniqueId": "090397061E7+E6N2>>C2",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "32",
                                                    "UniqueId": "090397061&7K2JEC\\+?,",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                }
                                            ]
                                        },
                                        {
                                            "text": "RWY 05-23",
                                            "UniqueId": "090397061=F9.^UT[H,4",
                                            "ClassUniqueId": "Branch",
                                            "leaf": false,
                                            "children": [
                                                {
                                                    "text": "A",
                                                    "UniqueId": "090397061=C?7+E%&PB6",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "B",
                                                    "UniqueId": "090397061555V<H.P\\3&",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                }
                                            ]
                                        },
                                        {
                                            "text": "RWY 14-32",
                                            "UniqueId": "090397061`R@WZRY3Z0\\",
                                            "ClassUniqueId": "Branch",
                                            "leaf": false,
                                            "children": [
                                                {
                                                    "text": "A",
                                                    "UniqueId": "090397061P\\Z3J\\3^)24",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "B",
                                                    "UniqueId": "090397061&C(X]2`*[AG",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "C",
                                                    "UniqueId": "090397061U$:+A1ZZ0&P",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "D",
                                                    "UniqueId": "090397061ZJ`?^QB/]52",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "E",
                                                    "UniqueId": "090397061L)7(,PRL2,/",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "F (inter)",
                                                    "UniqueId": "090397061>/%8A?WB4+*",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                }
                                            ]
                                        },
                                        {
                                            "text": "T/HANGAR STREETS",
                                            "UniqueId": "090397061[=[#U9@ES;5",
                                            "ClassUniqueId": "Branch",
                                            "leaf": false,
                                            "children": [
                                                {
                                                    "text": "A",
                                                    "UniqueId": "090397061JLR1?5\\M]>?",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "B",
                                                    "UniqueId": "090397061)BL%1^N>80#",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "C",
                                                    "UniqueId": "090397061\\BA>011`2\\U",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "D",
                                                    "UniqueId": "090397061P]F)*WT2&@C",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                }
                                            ]
                                        },
                                        {
                                            "text": "TAXIWAY",
                                            "UniqueId": "090397061DEE#O)[[[7#",
                                            "ClassUniqueId": "Branch",
                                            "leaf": false,
                                            "children": [
                                                {
                                                    "text": "A1",
                                                    "UniqueId": "090397061F[8AR*O:-AW",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "A2",
                                                    "UniqueId": "090397061JRYN:3`[89C",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "A3",
                                                    "UniqueId": "090397061=/7CP@Z$@&*",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "A4",
                                                    "UniqueId": "090397061/7E431-$N#K",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "A5",
                                                    "UniqueId": "090397061VXL5*,@/KF?",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "B1",
                                                    "UniqueId": "0903970618KX@&T^(V<K",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "B2",
                                                    "UniqueId": "090397061N&3WE:A%CCX",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "C",
                                                    "UniqueId": "090397061SWNN<<J>*Z+",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "D1",
                                                    "UniqueId": "090397061:^EG?:A[2M6",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "D2",
                                                    "UniqueId": "090397061U8]YP_];Y0[",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "D3",
                                                    "UniqueId": "090397061:UX.W&.OLH5",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "E",
                                                    "UniqueId": "09039706142_/G&W[1)E",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "F",
                                                    "UniqueId": "090397061^Q*SBX#T+A`",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "G",
                                                    "UniqueId": "090397061BPMNX/PZ+*E",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "H",
                                                    "UniqueId": "090397061V9G*?VV@`A+",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "J1",
                                                    "UniqueId": "090397061AK*9G:Q<UNF",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "J2",
                                                    "UniqueId": "090397061R^RE09T8Z@O",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "L",
                                                    "UniqueId": "090397061OF/EJ?KA*B;",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "M1",
                                                    "UniqueId": "090397061-`9TWM9[.,:",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "M2",
                                                    "UniqueId": "090397061+$?O7K*AQ-J",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                },
                                                {
                                                    "text": "N",
                                                    "UniqueId": "0903970619VQM38J1AQQ",
                                                    "ClassUniqueId": "Section",
                                                    "leaf": true
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ];
                                Ext.getCmp('TreeSelectorControl').getRootNode().appendChild(children);
                });
    
                myWin.show();
    
            }, this);
    Last edited by Condor; 26 May 2010 at 5:44 AM. Reason: Please post using [CODE] tags!

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    1. The TreePanel is missing autoScroll:true.
    2. Why are you adding the children on show and not in initComponent (you can specify 'children' inside 'root' - no need to add them).

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    8
    Vote Rating
    0
    pietromenea is on a distinguished road

      0  

    Default


    Thank you Condor,

    the autoScroll:true fix the problem with the scroll but if I turn on the animation I still receive an error if I expand all the nodes

    The error is:
    if (!Ext.fly(node.ui.wrap).isVisible() && selectNextNode) { ext-all-debug.js (line 31662)

    anyway the animation is not required.

    I need to load dynamically the nodes because the request to modify the nodes can arrive from other forms connected with this one throw the server.

  4. #4
    Ext JS Premium Member
    Join Date
    May 2010
    Posts
    77
    Vote Rating
    0
    karthik085 is on a distinguished road

      0  

    Default


    what was the solution to this problem (selectNextNode being undefined)? How did you fix it?

Similar Threads

  1. Documentation/Manual
    By oebess in forum Ext Designer: Help & Discussion
    Replies: 8
    Last Post: 16 Aug 2011, 9:02 PM
  2. ExtCore Manual
    By eTiger13 in forum Ext: Q&A
    Replies: 3
    Last Post: 26 Oct 2009, 10:34 PM
  3. treeview dont load json
    By salsa in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 16 Feb 2009, 4:36 AM
  4. Asynchronously load data in treeview
    By admiralato in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 21 Oct 2008, 12:31 AM
  5. ext manual
    By Novalis in forum Community Discussion
    Replies: 2
    Last Post: 17 Oct 2008, 6:17 AM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi