Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    51
    Vote Rating
    2
    art.dev.ext is on a distinguished road

      0  

    Default tabpanel activeTab is not overridden by container defaults

    tabpanel activeTab is not overridden by container defaults


    U]REQUIRED INFORMATION[/U]


    Architect Build tested:
    • 2.1.0 Build: 678

    Project Type:
    • ExtJS 4.1.x

    Description:
    • Tabpanel missing activeTab automatically set to 0 after moving a child from tree.
    • Tabpanel activeTab is not overridden by container defaults.

    Steps to reproduce the problem:
    • remove property activeTab from a TabPanel (because it is set by container defaults property)
    • Move Up (or down) a tab within TabPanel

    The result that was expected:
    • activeTab stays removed
    • Or container defaults overrides TabPanel child activeTab property

    The result that occurs instead:
    • activeTab:0 gets back
    • container defaults is being overridden by TabPanel.activeTab

    HELPFUL INFORMATION

    Possible fix:
    • not provided

    Operating System:
    • Window 7 Pro 64bits

  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


    Could you provide an example that illustrates the problem?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Mar 2008
    Posts
    51
    Vote Rating
    2
    art.dev.ext is on a distinguished road

      0  

    Default


    1) define a Window containing a TabPanel (with 2 panels) :

    Code:
    Ext.define('MyApp.view.MyWindow', {
        extend: 'Ext.window.Window',
        height: 250,
        width: 400,
        title: 'My Window',
        initComponent: function() {
            var me = this;
            Ext.applyIf(me, {
                items: [
                    {
                        xtype: 'tabpanel',
                        activeTab: 0,
                        items: [
                            {xtype: 'panel',title: 'Tab 1'},
                            {xtype: 'panel',title: 'Tab 2'}
                        ]
                    }
                ]
            });
            me.callParent(arguments);
        }
    });
    2) In Application.launch() :
    Code:
    Ext.create('MyApp.view.MyWindow',{
            defaults:{
                activeTab:1 // consider this should not be a constant
            }
        }).show();
    => Tab1 is active (Tab2 should be)

    3) Now remove property activeTab:0 from TabPanel
    4) Save, publish and test => Tab2 is active (expected result)
    5) Now add a new panel to TabPanel (or reorder existing)
    => activeTab:0 is automatically added to TabPanel config

    Hope this helps
    Thanks

  4. #4
    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


    Quote Originally Posted by art.dev.ext View Post
    => Tab1 is active (Tab2 should be)
    Why would Tab2 be active? You are overriding the default from 1 to 0 and therefore Tab1 would be active.

    re: 5) we are setting a default activeTab for you; there is no way for us to know that you are creating it somewhere else and setting the defaults. You'll have to clear it.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User
    Join Date
    Mar 2008
    Posts
    51
    Vote Rating
    2
    art.dev.ext is on a distinguished road

      0  

    Default


    No, I'm not overriding from 1 to 0, it is the way to reproduce it (SA set 0 as default).
    If you read further, you should see that I removed activeTab property from TabPanel.

    Let's consider having a toolbar with 2 buttons that open a window containing this tabpanel.
    The first button opens window with tabpanel.activeItem = 0
    The second one opens window with tabpanel.activeItem = 1
    Since my window is not destroyed on close, I have no problem only after it has been showed once.

    Now if any dev-guy need to add a third panel (and so another button), he will get throw this annoyance.

    Any button that will be clicked will always open window with activeTab:0 since deleted activeTab property will 'magicallly' come back

    The fact is that it may be an ExtJs bug instead of an Architect one. activeTab property should be overridden by container defaults, that does not happen here.

  6. #6
    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


    Quote Originally Posted by art.dev.ext View Post
    Any button that will be clicked will always open window with activeTab:0 since deleted activeTab property will 'magicallly' come back
    I understand the annoyance, this is by design though that we are setting a default tab.

    Quote Originally Posted by art.dev.ext View Post
    The fact is that it may be an ExtJs bug instead of an Architect one. activeTab property should be overridden by container defaults, that does not happen here.
    I don't understand this one. If you've set defaults but then set an activeTab directly, the activeTab that you set directly overrides the defaults, not the other way around.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha User
    Join Date
    Mar 2008
    Posts
    51
    Vote Rating
    2
    art.dev.ext is on a distinguished road

      0  

    Default


    1/ in fact, activeTab is not mandatory for tabpanel in ExtJs.
    Code:
    Line 115255 : activeTab = me.activeTab || (me.activeTab = 0)
    It is already set to 0 if not defined. I'm not sure SA should set its value.

    2/ You're right, I was wrong. Maybe I tested it after SA reset the value

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