1. #1
    Sencha User artalat's Avatar
    Join Date
    Jun 2009
    Location
    Lahore, Pakistan
    Posts
    44
    Vote Rating
    0
    artalat is on a distinguished road

      0  

    Default setIconClass not working dynamically for tabs

    setIconClass not working dynamically for tabs


    setIconClass for tabs wont recognize my string in a variable. in the below example if "Flagged" is sent to loadFolder, the title changes, but not the icon. I tried tabs.getItem(0).setIconClass(FlaggedIconCls) in firebug, and it worked, i tried the same in the function, it worked....it just wont work when i send a variable (icon in this example)...am i missing something here?


    Code:
    var FlaggedIconCls = 'flag';
    
    function loadFolder(name)
    {
        mailStore.proxy.setUrl('get' + name + '.php'); 
        mailStore.load();
    
        //console.log(tabs.getItem(0));
        mailStore.on({
            'load':{
                fn: function()
                {
                    var icon = name + 'IconCls';
                    tabs.getItem(0).setTitle(name, icon);
                    //var icon = name + 'IconCls';
                    //tabs.getItem(0).setIconClass(icon);
                    console.log(icon);
                },
                scope:this
            },
            'loadexception':{
                //consult the API for the proxy used for the actual arguments
                fn: function(obj, options, response, e){
                    console.info('store loadexception, arguments:', arguments);
                    console.info('error = ', e);
                },
                scope:this
            }
        });
    };
    Thanks

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    If you tried FlaggedIconClass ('flag') and it worked maybe you have a css class name issue. Looks like the code will set the css class to 'flagIconCls'.

    If this is not the issue drill down with firebug to inspect the tab and see if the tab element has an icon class set properly.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User artalat's Avatar
    Join Date
    Jun 2009
    Location
    Lahore, Pakistan
    Posts
    44
    Vote Rating
    0
    artalat is on a distinguished road

      0  

    Default


    Thanks, ill look into it and get back.

Thread Participants: 1

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