PDA

View Full Version : Error 'targetContext is undefined' while using 'fieldset'



Supriya Kale
6 Dec 2012, 1:30 AM
Hi,

I am trying to use 'fieldset' but as soon as I set the 'collapsed' property to ' true' I get error 'targetContext is undefined' in Container.js at 'frameInfo = targetContext.getFrameInfo()'.
Do we need to set something else too?

Please find my code below:


{
xtype:'fieldset',
checkboxToggle:true,
name:'shouldAllowPasswordProtecteInvites',
id:'shouldAllowPasswordProtecteInvites',
title: 'Password protected invites',
collapsed: true,
disabled: true,
items:[{
xtype:'form',
items:[
{
xtype:'textfield',
inputType: 'password',
name:'invitePassword',
fieldLabel: 'Enter Password'
},
{
xtype:'textfield',
inputType: 'password',
fieldLabel: 'Renter Password'
}
]
}]

}

mitchellsimoens
8 Dec 2012, 6:26 AM
What Ext JS 4.x.x version are you using? Not getting an error in 4.1.1 or 4.1.3

info@ferraresegroup.com
22 Jan 2013, 5:10 PM
Hi all,
same problem for me in ExtJs 4.1.3.

---------- FireFox Console --------------------------------
TypeError: targetContext is undefined



chrome://firebug/content/blank.gif

frameInfo = targetContext.getFrameInfo(),


into ext-all-debug-w-comments.js (row 41928)

Supriya Kale
28 Jan 2013, 8:47 PM
I am using 4.1.0

eljuventino
11 Dec 2013, 2:43 AM
i have the same problem but it seems that none find a solution yet.
i'm using the EXTJS 4.2.2

Mark_R
5 Mar 2014, 12:59 PM
v. 4.2.2. same problem

VDP
31 Dec 2014, 1:57 AM
I have the same problem! no solutions? My guess is that it's an issue with calculating the layouts. I tried by adding an afterrender listener where I collapse it then.. but no dice :) same issue...

FOUND A SOLUTION! (not the best but it is one..)

after the callParent in the initComponent of the container (toolbar, panel, ...) around the fieldset, I set a timeout for 1 ms and collapse it there... Visually it's collapsed on render....



initComponent: function () {
var me = this;


Ext.applyIf(me, {
//some stuff containing items, containing the fieldset
});


me.callParent();
setTimeout(function () {
me.down('fieldset').collapse();
}, 1);
}