1. #1
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Question Uncaught TypeError: Cannot read property 'containerBox' of null

    Uncaught TypeError: Cannot read property 'containerBox' of null


    Hi

    I have a panel where I need to create a form when the user clicks a button. But when I try to do that, I get the following error in Chrome's console:

    Code:
    Uncaught TypeError: Cannot read property 'containerBox' of null
       Ext.Container.Ext.extend.onFieldFocussencha-touch-debug.js:20996
       fieldEventWrap.focussencha-touch-debug.js:20937
       firesencha-touch-debug.js:979
       Ext.util.Observable.Ext.extend.fireEventsencha-touch-debug.js:595
       Ext.form.Text.Ext.extend.onFocussencha-touch-debug.js:27592
       anonymous:5
       (anonymous function)
    My code is simple:

    Code:
    //[...] Other panel stuff [...]
    
    //When the user click a button:
    contactScreen.add({
    	cls: 'editForm',
    	itemId: 'editForm',
    	xtype: 'formpanel',	
    	items: [{
    		xtype: 'textfield',
    		itemId: 'name',
    		name: 'name',
    		label: 'Name'
    	}]
    });
    
    //[...] Other panel stuff [...]
    If I just add a formpanel to the panel's items array before render everything is fine, unless I specify the hidden attribute of the formpanel. If I then call the show() method at runtime, I once again get the above error.

    I'm mystified, so I would really appreciate some help!
    Last edited by lasseok; 14 Feb 2011 at 12:13 PM. Reason: Clarification

  2. #2
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default


    Anyone?

Similar Threads

  1. Uncaught TypeError: Cannot read property 'dom' of null
    By webarnie in forum Ext Designer: Help & Discussion
    Replies: 4
    Last Post: 2 Oct 2012, 6:42 AM
  2. Uncaught TypeError: Object #<an Object> has no method 'read'
    By babar.sajjad in forum Sencha Touch 1.x: Discussion
    Replies: 14
    Last Post: 19 Nov 2011, 7:17 AM
  3. Replies: 4
    Last Post: 3 Aug 2011, 2:54 PM
  4. Uncaught TypeError: Cannot read property 'length' of undefined
    By a2rdvark in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 23 Dec 2010, 3:48 PM
  5. TypeError: Cannot read property 'parentNode' of undefined
    By zurdophp in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 2 Sep 2010, 5:58 AM

Tags for this Thread