1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    49
    Vote Rating
    0
    zakif is on a distinguished road

      0  

    Default How to make GroupTabPanel items dynamic loading?

    How to make GroupTabPanel items dynamic loading?


    Dear all,

    I have grouptabpanel as coded below:

    Code:
    xtype: 'grouptabpanel',
                tabWidth: 200,
                activeGroup: 0,
                items: [
                {
                    mainItem: 0,
                    items: [
                             {
                        xtype: 'portal',
                        title: 'Configuration',
                        tabTip: 'Dashboard tabtip'
                        
                    }
                    , 
                    {
                        
                        title: 'Language',
                        layout: 'fit',
                        iconCls: 'x-icon-tickets',
                        tabTip: 'Language tabtip',
                        style: 'padding: 10px;',
                        items:[languages_grid]
                    }
    I have dynamic loading library that intentioned to load Languages sub-menu only when clicked.

    The problems are:

    1. What is the xtype of Language sub-menu? I've try to set the "xtype" to 'tabpanel', but the result was error.
    2. How to configure the listener/handler (?) to Language so that the dynamic load function can called "languages_grid.js"?
    3. Are there anything related to "items:[languages_grid]"? Because the grid itself is defined inside languages_grid.js file. I've just tried to code listeners as below, but the result is "languages_grid is not defined".

    Here is the code (by guessing xtype is tabpanel, and listeners on tabchange):

    Code:
    var viewport = new Ext.Panel({
            layout:'fit',
            renderTo    : 'content',
            title       : '<a href="<?php echo $this->baseUrl();?>/logout.php">Logout</a>', 
            collapsible : false, 
           
                    items:[
                          
                     {
                xtype: 'grouptabpanel',
                tabWidth: 200,
                activeGroup: 0,
                items: [
                {
                    mainItem: 0,
                    items: [
                             {
                        xtype: 'portal',
                        title: 'Configuration',
                        tabTip: 'Dashboard tabtip'
                        
                    }
                    , 
                    {
                        
                        title: 'Language',
                        layout: 'fit',
                        iconCls: 'x-icon-tickets',
                        tabTip: 'Language tabtip',
                        style: 'padding: 10px;',
                        
                        listeners: {
                            'tabchange': function(){
                                    scripts : 'js/languages_grid.js',
                                ScriptMgr.loadJs({
                                    callback : function(){
                                                                            
                                    }
                                });
                            }
                            
                        },
                        items:[languages_grid]
                    }
    Any kind solution and advices would be appreciated. Thanks in advance!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    grouptabpanel does not seem to support adding items dynamically.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    49
    Vote Rating
    0
    zakif is on a distinguished road

      0  

    Default What is the alternative?

    What is the alternative?


    Thanks a lot for your clue, mitchellsimoens.

    What do you recommend as an alternative to grouptabpanel? So I can have sidebar menu containing grid that will be loaded only when the menu clicked.

    Thanks.

Thread Participants: 1

Tags for this Thread

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