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
    9,168
    Vote Rating
    119
    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 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

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..."