Results 1 to 3 of 3

Thread: [CLOSED][4.0.2] Ext.panel.Panel with layout card: bbar is null

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    810
    Vote Rating
    70
      0  

    Default [CLOSED][4.0.2] Ext.panel.Panel with layout card: bbar is null

    Possible bug: bbar is null(see the comment in code), dockedItems is ok,
    as example:
    Code:
    Ext.define('Appname.view.Card', {
        extend: 'Ext.panel.Panel',
        alias: 'widget.cardpanel',
        
        requires: ['Ext.layout.container.Card'],
            
        initComponent: function(){  
            var me = this;
    
            Ext.apply(me, {
                frame: false,
                autoScroll : true,
                layout:'card',
                activeItem:0,
                bbar: ['->', {   
                    id: 'card-prev',
                    text: me.btnPrevText,
                    handler: Ext.Function.bind(me.cardNav, this, [-1]),
                    disabled: true
                },{
                    id: 'card-next',
                    text: me.btnNextText,
                    handler: Ext.Function.bind(me.cardNav, this, [1])
                    ,disabled: true
                }],
                items:[.....]
            });
    
            me.callParent(arguments);
        },
        cardNav:function(incr,index){
            var me = this;
            var l = me.getLayout();
            if(incr!=undefined){
                 var i = l.activeItem.itemId.split('card-')[1];
                 index = parseInt(i, 10) + incr;
            }
                  
            l.setActiveItem(index);
            Ext.getCmp('card-prev').setDisabled(index===0);
            Ext.getCmp('card-next').setDisabled(index===6);
    
           // CHECK HERE : bbar is null
            if(index==5){
                var btn = me.dockedItems.items[0].getComponent('card-next');  // HERE IS OK.
                .............
            }
        }    
    });
    Shouldn't contain the "bbar" the items of "dockedItems" ?

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,237
    Vote Rating
    1015
      0  

    Default

    No. The bbar is just there for convenience, you should access anything you need via the docked items.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    810
    Vote Rating
    70
      0  

    Default

    I see... , thx Evant.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •