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

      0  

    Default [2.x] treePanel#selectPath(tree.getRootNode().getPath()) does not select root

    [2.x] treePanel#selectPath(tree.getRootNode().getPath()) does not select root


    to fix:

    Code:
        selectPath : function(path, attr, callback){
            attr = attr || "id";
            var keys = path.split(this.pathSeparator);
            var v = keys.pop();
            if(keys.length > 0){
                var f = function(success, node){
    needs to be:

    Code:
        selectPath : function(path, attr, callback){
            attr = attr || "id";
            var keys = path.split(this.pathSeparator);
            var v = keys.pop();
            if(keys.length > 1){
                var f = function(success, node){
    test case:
    Code:
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Reorder TreePanel</title>
                <link rel="stylesheet" type="text/css" href="http://extjs.com/deploy/dev/resources/css/ext-all.css" />    
                 <link rel="stylesheet" type="text/css" href="http://extjs.com/deploy/dev/resources/css/xtheme-default.css" /><!-- LIBS -->
                 <script type="text/javascript" src="http://extjs.com/deploy/dev/adapter/ext/ext-base.js"></script>
                <script type="text/javascript" src="http://extjs.com/deploy/dev/ext-all.js"></script>
                <link rel="stylesheet" type="text/css" href="http://extjs.com/deploy/dev/examples/shared/examples.css" />
                <script language="javascript" type="text/javascript">
                    Ext.onReady(function(){
                        // shorthand
                        var Tree = Ext.tree;
                        
                        var tree = new Tree.TreePanel({
                            el:'tree-div',
                            useArrows:true,
                            autoScroll:true,
                            animate:true,
                            enableDD:true,
                            containerScroll: true,
                    
                            root: {
                                text: 'Ext JS',
                                draggable:false,
                                id:'source'
                            }
                        });
                    
                        // render the tree
                        tree.render();
                        tree.selectPath(tree.getRootNode().getPath('id'), 'id', function(success, node) {
                            alert('success = ' + success)
                        });
                    });
            </script>
        </head>
        <body>
            <div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"></div>
        </body>
    </html>

  2. #2
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
    watrboy00 is on a distinguished road

      0  
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

Thread Participants: 1

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