Results 1 to 4 of 4

Thread: GroupingStore GridPanel LoadMask infinite loop

  1. #1
    Sencha User
    Join Date
    Apr 2009
    Posts
    11

    Question GroupingStore GridPanel LoadMask infinite loop

    Hi everybody,

    i struggle with a LoadMask that will not disappear after the store has load it's data.

    the store looks like this:

    Code:
    Ext.ns('FhhForschungsprojekte.Module');
    FhhForschungsprojekte.Module.ForschungsantragStore = Ext.extend(Ext.data.GroupingStore,{
      constructor: function(config) {
        config = Ext.apply({groupField: 'forschungsprojekt', storeId: 'ForschungsantragStore', reader: new FhhForschungsprojekte.Module.ForschungsantragJsonReader, writer: new FhhForschungsprojekte.Module.ForschungsantragJsonWriter, proxy: new FhhForschungsprojekte.Module.ForschungsantragHttpProxy, autoSave: true, restful: false, batch: false, autoLoad: true},config);
    
      FhhForschungsprojekte.Module.ForschungsantragStore.superclass.constructor.call(this,config);
    }});
    It's used in a GridPanel which looks like this:
    Code:
    FhhForschungsprojekte.Module.ForschungsantragGrid = Ext.extend(Ext.grid.GridPanel, {
        constructor: function(config) {
            
            var tbar = this.buildUI();
            var store = new FhhForschungsprojekte.Module.ForschungsantragStore;
            
            config = Ext.apply({
                id: 'ForschungsantragGrid',
                title: "Antrge",
                store: store,
                columns: FhhForschungsprojekte.Module.ForschungsantragColumns,
                iconCls: "icon-grid",
                tbar: tbar,
                forceLayout: true,
                view: new Ext.grid.GroupingView({
                    forceFit: true,
                    groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Antrge" : "Antrag"]})'
                }),
                loadMask: {
                    msg:'Lade Forschungsantrge...',
                    hideOnReady:false
                },
                /*listeners : { 
                    afterrender: function(grid) {
                        console.log('render listener called');
                        grid.loadMask.show();
                        grid.getStore().load();
                    },
                    delay : 10,
                }*/
            }, config);
            FhhForschungsprojekte.Module.ForschungsantragGrid.superclass.constructor.call(this, config);
        },
    });
    I've tried to configure the store with autoLoad and with loading inside the 'render'-listener. In all cases the LoadMask will appear until the end of nowhere

    I've also tried to call the load() function with a callback - which will never come back.

    When i change my Store from Ext.data.GroupingStore to Ext.data.Store everything works well.

    Any hints?

    regards
    Dennis

  2. #2

    Default

    I have a similar issue with an infinitely looping loadMask as well. I call an explicit load on my Ext.data.Store which does call out a Json request successfully with a successful response, and does update the GridPanel, however the loadMask never disappears... I can only reproduce this in IE8 (in IE7 compatability). Firefox works fine.

    Coincidentally, i tried to set a "load" listener on the Ext.data.Store, and this listener never gets called in IE8. Firefox works fine.

  3. #3
    Sencha User
    Join Date
    Apr 2009
    Posts
    11

    Default

    Hi,

    i made sure that the load event from the store is not fired when the data "arrived".

    I had a look in the store object with firebug and there are two events registered for the store. The first is the onLoad() function from the grid and the second should be the grid.loadMask.hide() function.

    I've also had a look to the events called by the used HttpProxy. He fires it's load event.

    the beforeload event is correctly fired on the store - thats the reason why the loadMask is infinite visible...

    The load event itself seems to be ok. While digging around i've proofed, that the load event is fired when i click on a button with the following handler-content
    Code:
    this.store.fireEvent('load');
    any clue where i have to dig next?

    regards

  4. #4
    Sencha User
    Join Date
    Apr 2009
    Posts
    11

    Default solved

    Hi again,

    i found the reason:

    the loadRecords function died before fireing the load Event when calling applySort().

    when setting
    Code:
    sortInfo:{field: 'somefield', direction: "ASC"}
    in the GroupingStore config everything works well.

    regards

Posting Permissions

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