Results 1 to 6 of 6

Thread: 'lockingPartnerContext' error in ColumnLayout with Ext JS 5.1.0 Beta

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    290
    Answers
    9
    Vote Rating
    21
      0  

    Default 'lockingPartnerContext' error in ColumnLayout with Ext JS 5.1.0 Beta

    I recently downloaded the new Ext JS 5.1.0 beta and tried running my application. I've encountered two problems which I'm currently investigating. One problem happens when I activate one of the tabs on my tab bar. When I click it, the panel doesn't display and instead I get a message which says:

    Code:
    Cannot read property 'lockingPartnerContext' of undefined  (line 153 of ColumnLayout.js)
    This panel displayed fine in the current release version of Ext JS 5. Anything in particular I should look at to resolve this problem?

    The other issue I have is with a buffered grid. I see requests made to the server for data and I return data, but the data doesn't display. If I ever so slightly touch my scroll wheel, the results display. Not sure what is going on here but I'm going to dig into it to see if I can get more information on why the data isn't displaying. Again, this wasn't happening with the release version, although I was having problems with data not displaying in certain situations when scrolling to areas of the grid which needed to be loaded.

    I don't currently have any simple examples which illustrate the problem.

    Thanks.

    Jim

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    290
    Answers
    9
    Vote Rating
    21
      0  

    Default

    So I think I figured out the 'lockingPartnerContext' problem, sort of. The panel which is giving me problems consists of three grid panels grouped together in a border layout, 'west', 'center', 'east'. When I ported the code from 4.2 to 5.0 I started seeing 'Layout run failed' messages when this panel was displayed.

    I discovered that if I added a "layout: 'auto'" to each panel the error would go away. I made this setting in the initComponent method of each of my grid panels. The 'lockingPartnerContext' problem seems to have been caused by the fact that in one panel I added the line defining the layout *after* the call to the parent initComponent method. When I moved the line before the callParent the 'lockingPartnerContext' error went away.

    The problem now is that the 'lockingPartnerContext' error has been replaced with a new error. The new error is in TableLayout.js on line 163 and the error is "Cannot read property 'tooNarrow' of undefined"The line of code reads:if (ownerContext.headerContext.state.boxPlan.tooNarrow) { Obviously 'boxPlan' is undefined.If I remove the call which sets the layout to 'auto', the panel will display, but I once again have the 'Layout run failed' error.Obviously there is something not quite right with the way I have this particular set of panels defined.Still no more information on why my other grid panel doesn't display any data until I scroll it a bit.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    290
    Answers
    9
    Vote Rating
    21
      0  

    Default

    Ok, it seems that the root of my problem with the 'lockingPartnerContext' and later the 'tooNarrow' is the fact that I didn't specify a width for my third panel (the 'east'). I had specified a width for the 'west' panel, and then left it up to the border layout to do the center and east. Now that I've set a width on the 'east' panel, I no longer get any runtime errors, no 'Layout run failed', etc. I am, however, still left with the buffered grid problem not displaying. That one might be more of a challenge to track down.

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,351
    Answers
    3995
    Vote Rating
    1497
      0  

    Default

    Does the grid have a height specified by the height config or a parent layout?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    290
    Answers
    9
    Vote Rating
    21
      0  

    Default

    I don't believe there are an explicit height settings. The grid is inside of a border layout which is inside the viewport and will grow/shrink accordingly.

    To see an example of what happens when the grid loads look at this fiddle - https://fiddle.sencha.com/#fiddle/d44 When you run it, the page will display but until you scroll the page just a little bit the screen will be blank. If you remove the locked column and re-run, the page displays fine.

    Jim

  6. #6

    Join Date
    Nov 2012
    Location
    Cheshire
    Posts
    45
    Answers
    2
    Vote Rating
    6
      0  

    Default

    For future reference if anyone else has this error.
    Code:
    app.js?_dc=1531323454099:68675 Uncaught TypeError: Cannot read property 'lockingPartnerContext' of undefined
    I saw this error when calling removeAll() on the grid component instead of through the store attached to the grid. Whoops

    Bad
    Code:
    panel.removeAll(true);
    Good
    Code:
    panel.getStore().removeAll(true);

Posting Permissions

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