Results 1 to 5 of 5

Thread: 1.1b2 GridView in ContentPanel

  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,215
    Vote Rating
    1008
      0  

    Default 1.1b2 GridView in ContentPanel

    This one is a bit long, I'll try and make it succinct, I would make up a demo but I don't really have time.

    Version: 1.1b2
    Adapter: Ext base
    OS: Windows
    Browser: IE7

    1) There are a series of links in a west panel. Clicking on an link in the west panel loads a CP in the center panel.
    2) Each center panel contains a bunch of content, including a grid (nb: not using a GridPanel, but a CP). The grid works correctly and everything is fine up until this point.
    3) If the user clicks the links in the left in quick succession (say 3 in 1 second) Ext throws an exception. A list of the exceptions is below, and what I did to stop them occurring.

    First exception:
    Method - Ext.grid.GridView.updateSplitters
    Error - s[i].style is null or not an object
    Fix -
    Code:
    if (s[i]) s[i].style.left = (pos-this.splitOffset) + "px";
    Once this was solved, there is now
    Second exception:
    Method - Ext.grid.GridView.updateHeaderSortState
    Error - hds.item is null or not an object
    Fix -
    Code:
    if (hds.item == 'object') hds.item(sortColumn).addClass(sc[sortDir == "DESC" ? 1 : 0]);
    Once this was solved, there is now
    Third exception:
    Methd - Ext.grid.GridView.scrollToTop
    Error - An unknown exception occurred
    Fix -
    Code:
    try
    {
       this.scroller.dom.scrollTop = 0;
       this.syncScroll();
    }

    I realise this might be a bit vague, but these might be nice sanity checks to have on the GridView (and it appears to resolve the issue).

  2. #2
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
      0  

    Default

    sorry to sound repetitive, but have you tried this with 1.1 RC1?

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,215
    Vote Rating
    1008
      0  

    Default

    Tried in RC1, same issue applies.

    Basically I think what's happening is that the grid is still initialising when the dom has already disappeared.

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,215
    Vote Rating
    1008
      0  

    Default

    Bump

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    There's is nothing Ext can do about rapid clicks of links, the grid and other components have no way of knowing about this stuff. What you will need to do is buffer the clicks (it's what I do in the FeedViewer and other examples). This way, if the user clicks rapidly, only the last click is used.
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

Posting Permissions

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