Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default [TENT][3.0.0] Referencing child items when extending a container.

    [TENT][3.0.0] Referencing child items when extending a container.


    When I extend any container class and define items in initComponent() method, I cannot reference body properties of the items in either onRender() or afterRender() methods. Also I'm unable to reference a child item by a named reference created using ref config option specified on that item.

    Please refer to this thread for code example to reproduce the defect and suggested solution by Animal:
    http://extjs.com/forum/showthread.php?t=76829

    Here's the copy of the code:
    PHP Code:
    MyPanel Ext.extend(Ext.Panel, {
        
    width500,
        
    height500,
        
        
    initComponent: function() {
            var 
    config = {
                
    layout'border',
                
    items: [{
                    
    region'west',
                    
    title'West',
                    
    html'blah blah',
                    
    width200,
                    
    splittrue,
                    
    margins'5 0 5 5'
                
    }, {
                    
    region'center',
                    
    title'Center',
                    
    html'Lorem ipsum dolor sit amet...',
                    
    margins'5 5 5 0',
                    
    itemId'center-region',
                    
    ref'../centerRegion'
                
    }]
            };
            
    Ext.apply(thisconfig);
            
    MyPanel.superclass.initComponent.call(this);
        },
        
        
    afterRender: function() {
            
    MyPanel.superclass.afterRender.apply(thisarguments);
            
            
    console.log(this.body); // ok
            
    console.log(this.getComponent('center-region')); // ok
            
    console.log(this.getComponent('center-region').body); // undefined
            
    console.log(this.centerRegion); // undefined
        
    }
    }); 
    Thank you.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Confirmed, this has been fixed in SVN.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    The change associated with this thread has caused other issues, opened in a new thread:
    http://extjs.com/forum/showthread.ph...229#post370229

Thread Participants: 2