1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    14
    Vote Rating
    0
    jbd3rd is on a distinguished road

      0  

    Default TreePanel using xtype: 'treepanel' icons will not display

    TreePanel using xtype: 'treepanel' icons will not display


    I'm creating a Treepanel using xtype: 'treepanel'
    The TreePanel is being place is the west region of a border layout.

    Everything works as I expect it to except no icons display for branches and leaves of the tree.

    Has anyone encountered this?
    Trying to get this working for a client demo on Monday AM.....any help / advice would be greatly appreciated...

    This is the code I have for creating the TreePanel

    PA.PropertyTree = function()
    {
    /*
    * Create the Property Tree Object
    */
    function createPropertyTree()
    {
    return {
    xtype: 'treepanel',
    region: 'west',
    width: 250,
    lines: true,
    singleExpand: true,
    root: new Ext.tree.AsyncTreeNode({
    text: 'My Properties',
    id:'0'
    }),
    loader: new Ext.tree.TreeLoader({
    dataUrl:'../Property/propertyNavigation.do',
    baseParams: {
    method: 'retrievePropertyList'
    }
    })
    }
    }
    // public space
    return {
    /*
    * Create the Property Tree
    */
    getPropertyTreeObject: function()
    {
    return createPropertyTree();
    }
    };
    }();

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,660
    Vote Rating
    584
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    So the behaviour is correct if you use new Ext.tree.TreePanel?

    Have you set the blank image path?

  3. #3
    Ext User
    Join Date
    Mar 2008
    Posts
    14
    Vote Rating
    0
    jbd3rd is on a distinguished road

      0  

    Default


    I also tried using new Ext.tree.TreePanel and get the same results!!

    What is the blank image path? How do I set it?

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,660
    Vote Rating
    584
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

  5. #5
    Ext User
    Join Date
    Mar 2008
    Posts
    14
    Vote Rating
    0
    jbd3rd is on a distinguished road

      0  

    Default


    I have the blank image url set..
    Ext.BLANK_IMAGE_URL = '../ext-2.0/resources/images/default/s.gif';

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,660
    Vote Rating
    584
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Could you post an example online?

  7. #7
    Ext User
    Join Date
    Mar 2008
    Posts
    14
    Vote Rating
    0
    jbd3rd is on a distinguished road

      0  

    Default


    Found my problem. I went back and checked the blank image url one more time based on your previous post........that was my problem...

    I download ext-2.0.2 a few days ago into a directory named ext-2.0.2 and deleted a directory named ext-2.0
    I'm using Eclipse for my development environment. When I made this change Eclipse update links for me. Seems it missed one!!!!!
    My blank image url was still referencing ext2.0.
    I fixed this and now everything works as I expect it to.

    Ext.BLANK_IMAGE_URL , seems to be a powerful setting. It really causes the TreePanel to behave badly when not set correctly!!!

    Thanks for your help.

  8. #8
    Ext User
    Join Date
    Nov 2008
    Location
    NYC, New York
    Posts
    21
    Vote Rating
    0
    nish1303 is on a distinguished road

      0  

    Thumbs up similar issue resolved by changing relative path to absolute

    similar issue resolved by changing relative path to absolute


    The issue I had was that the relative path that I had set for Ext.BLANK_IMAGE_URL was not being picked up correctly. As a result of this, the TreePanel icons were messed up.

    Ext.BLANK_IMAGE_URL = '/ext-2.2/resources/images/default/s.gif';

    After a lot of tries I finally came across this thread where someone else had also faced an issue with the TreePanel behaving awkward.

    The resolution was to set the value to an absolute path. So basically I have a jsp which has the include scripts etc. Here I get the URL of the page being loaded and then add the path of s.gif to this.

    So it worked after i changed the above to

    Ext.BLANK_IMAGE_URL = url.getValue()+'/ext-2.2/resources/images/default/s.gif';

  9. #9
    Ext JS Premium Member prakashpaudel's Avatar
    Join Date
    May 2009
    Location
    Kathmandu, Nepal
    Posts
    58
    Vote Rating
    0
    prakashpaudel is on a distinguished road

      0  

    Default


    Quote Originally Posted by nish1303 View Post
    The issue I had was that the relative path that I had set for Ext.BLANK_IMAGE_URL was not being picked up correctly. As a result of this, the TreePanel icons were messed up.

    Ext.BLANK_IMAGE_URL = '/ext-2.2/resources/images/default/s.gif';

    After a lot of tries I finally came across this thread where someone else had also faced an issue with the TreePanel behaving awkward.

    The resolution was to set the value to an absolute path. So basically I have a jsp which has the include scripts etc. Here I get the URL of the page being loaded and then add the path of s.gif to this.

    So it worked after i changed the above to

    Ext.BLANK_IMAGE_URL = url.getValue()+'/ext-2.2/resources/images/default/s.gif';
    Thanks nish1303,
    This is what i was looking for. This solved my problem