1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    India
    Posts
    25
    Answers
    2
    Vote Rating
    0
    funnyfox is on a distinguished road

      0  

    Default Answered: TabPanel's Content Displaying 2 times One By One

    Answered: TabPanel's Content Displaying 2 times One By One


    I have a TabPanel with 2 tabs, this Tab Panel is invoked from 2 different screens.
    From First screen - We are disabling one tab and showing another one

    Code:
    this.invDetailPanel.invTabDetailPanel.getComponent('inv-2-tab').disable();                
    this.getLayout().setActiveItem(4);
    The 4th Item here is....

    Code:
    {
                            xtype: 'panel',
                            border:false,
                            layout:'anchor',
                            items: [
                                    me.invDetailPanel,
                                    {
                                        border : false,
                                        anchor:'100% 5%'
                                    }
                            ]
                        }

    From Second Screen - We are Setting this item to active.

    Code:
    this.getLayout().setActiveItem(1);
     this.invDetailPanel.loadInvDetail(invoiceId);

    The 1st Item here is ...
    Code:
    {
                    xtype: 'panel',
                    border:false,
                    autoScroll:true,
                    layout:'anchor',
                    items: [
                            me.invDetailPanel,
                            {
                                border : false,
                                anchor:'100% 5%'
                            }
                    ]
                }
    The problem here is , after accessing invDetailPanel from second screen and again accessing it from first screen and again come back and access from second screen, The TabPanel's first tab is shown twice one after the other, we are not sure about the problem. The TabPanel has a Grid and FieldSet, these 2 items are shown 2 times one by one inside first Tab as follows.
    The second Tab is fine

    Inv-1-Tab
    InvGrid
    FieldSet
    InvGrid
    FieldSet

    Any Help is appreciated.

    TabPanel Code inside InvDetail Panel is......


    Code:
    me.invTabDetailPanel = Ext.create('Ext.tab.Panel', {
                plain: true,
                border:false,
                items : [ {
                    title : 'First-Tab',
                    id: 'inv-1-tab',
                    bodyPadding: 10,
                    items : [me.InvGridPanel,{
                           xtype: 'container',
                           height: 20
                        },{
                            xtype:'fieldset',
                            title : 'Summary',
                            collapsible: true,
                            layout: 'column',
                            items :[{
                                xtype: 'container',
                                columnWidth:.5,
                                items:[{
                                         xtype : 'component',
                                         html : '<br/>'
                                       }]
                            },{
                                    xtype:'displayfield',
                                    fieldLabel: 'Total Amount',
                                    name: 'invoiceAmount',
                                    renderer : Ext.util.Format.usMoney,
                                    labelWidth: 150
                                }]
                            }]
                        }]
                }, {
                    title : 'Second-Tab',
                    id: 'inv-2-tab',
                    bodyPadding: 10,
                    items : [me.invRGridPanel,{
                           xtype: 'container',
                           height: 20
                        },{
                            xtype:'fieldset',
                            title : 'Some Summary',
                            collapsible: true,
                            layout: 'column',
                            items :[{
                                xtype: 'container',
                                columnWidth:.5,
                                items:[{
                                         xtype : 'component',
                                         html : '<br/>'
                                       }]
                            },{
                                    xtype:'displayfield',
                                    fieldLabel: 'Balance',
                                    name: 'BalAmount',
                                    renderer : Ext.util.Format.usMoney,
                                    labelWidth: 150
                                }]
                            }]
                        }]
                }]
            });

  2. You may want to try using itemId instead of 'id'.

    Thanks,
    Sriram

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Answers
    3362
    Vote Rating
    754
    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


    I don't see anything that you are adding new components so from what you have provided I don't see a reason.
    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.

  4. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    34
    Answers
    6
    Vote Rating
    2
    sriram139 is on a distinguished road

      0  

    Default


    You may want to try using itemId instead of 'id'.

    Thanks,
    Sriram

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Location
    India
    Posts
    25
    Answers
    2
    Vote Rating
    0
    funnyfox is on a distinguished road

      0  

    Default


    Thats Correct. Thanks

Thread Participants: 2

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