1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    32
    Answers
    3
    Vote Rating
    0
    AlexLans is on a distinguished road

      0  

    Default Answered: Tabpanel id property not working properly

    Answered: Tabpanel id property not working properly


    I've this code for creating a tabpanel:

    Code:
    var bottomToolbar = {            xtype: "tabpanel",
                id: 'navigationtab',
                styleHtmlContent: true,
                plugins: [new Ext.ux.touch.SwipeTabs()],
    
    
                tabBar: {
                    docked: 'bottom',
                    ui: 'dark',
                    layout: {
                        pack: 'center'
                    }
                },
                activeTab: 0,
                deferredRender: false,
                defaults: {
                    scroll: 'vertical'
                },
                items: [
                    {
                        //each item in a tabpanel requires the title configuration. this is displayed
                        //on the tab for this item
                        title: 'Home',
                        iconCls: 'home',
                        //next we give it some content
                        items: {
                            xtype: 'panel_home'
                        },
                        //then a custom cls so we can style it
                        cls: 'card1'
                    },
                    {
                        title: 'Radiologie',
                        iconCls: 'radiology',
                        items: {
                            xtype: 'panel_radiology',
                            centered: true
                        },
                        cls: 'card2'
                    },
                    {
                        title: 'Documenten',
                        items: {
                            html: '3',
                            centered: true
                        },
                        cls: 'card3'
                    }
                ]
            };
    The tabpanel is showing correctly in the UI, but when I click in the tabpanel at one of the images. It won't slide to that page. However when I remove the id property it all works fine. I need the id property, because I need to find this control in the controller. I've tried to use the itemId property and then in the controller trying to find the control with Ext.Container.getComponent, but then I get an error. In the Chrome console it tells me that it can;t find getComponent of [object]. I also tried the tabfix.js this I found on the internet.

    Code:
    Ext.define('NormaMob.extends.tabfix', {    override: 'Ext.tab.Panel',
        doTabChange: function (tabBar, newTab) {
            this.setActiveItem(tabBar.indexOf(newTab));
        }
    });
    When I put an alert in this function I see it sets the correct index to the ActiveItem, but the panels still won't slide. When I remove the id property and use itemId it does work fine, but I can't get the control with Ext.Container.getComponent.

    Is this a bug in the tappanel? I'm using Sencha Touch 2.0.1.1
    Please advise.

    With best regards,
    Alex van der Lans

  2. You are using ST 2.0.1.1,but your code is suitable for ST 1.0

  3. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    You are using ST 2.0.1.1,but your code is suitable for ST 1.0
    I write English by translator.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    32
    Answers
    3
    Vote Rating
    0
    AlexLans is on a distinguished road

      0  

    Default


    Thanks, I rewrote the tabpanel to 2.0 version and now it works like a charm.
    I don't know why I wrote it in this style, because all the other controls are already in 2.0 style

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