1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    21
    Vote Rating
    1
    Supriya Kale is on a distinguished road

      1  

    Default Unanswered: Error 'targetContext is undefined' while using 'fieldset'

    Unanswered: Error 'targetContext is undefined' while using 'fieldset'


    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:

    Code:
    {
                            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'
                                    }
                                ]
                            }]
                        
                    }

  2. #2
    Sencha - Senior Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,739
    Vote Rating
    925
    Answers
    3585
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What Ext JS 4.x.x version are you using? Not getting an error in 4.1.1 or 4.1.3
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    74
    Vote Rating
    9
    info@ferraresegroup.com will become famous soon enough

      0  

    Default Same problem in 4.1.3

    Same problem in 4.1.3


    Hi all,
    same problem for me in ExtJs 4.1.3.

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

    [IMG]chrome://firebug/content/blank.gif[/IMG] frameInfo = targetContext.getFrameInfo(),
    into ext-all-debug-w-comments.js (row 41928)

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Posts
    21
    Vote Rating
    1
    Supriya Kale is on a distinguished road

      0  

    Default


    I am using 4.1.0

  5. #5
    Sencha User
    Join Date
    Dec 2013
    Posts
    3
    Vote Rating
    0
    eljuventino is on a distinguished road

      0  

    Default


    i have the same problem but it seems that none find a solution yet.
    i'm using the EXTJS 4.2.2

  6. #6
    Sencha Premium Member
    Join Date
    Sep 2013
    Posts
    3
    Vote Rating
    0
    Mark_R is on a distinguished road

      0  

    Default


    v. 4.2.2. same problem

  7. #7
    Sencha User VDP's Avatar
    Join Date
    Feb 2012
    Location
    Boom, Belgium
    Posts
    88
    Vote Rating
    10
    Answers
    3
    VDP will become famous soon enough

      0  

    Default


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

    Code:
    initComponent: function () {
            var me = this;
    
    
            Ext.applyIf(me, {
                //some stuff containing items, containing the fieldset
            });
    
    
            me.callParent();
            setTimeout(function () {
                me.down('fieldset').collapse();
            }, 1);
        }