Pages

Thursday, April 14, 2011

ExtJS -=- Wait message while loading a store

Hi!

To display a loading message while a store is loading, simply add this line of code...

// Store Definition
var objectAStore =  new Ext.data.JsonStore({
    url: '/objecta/json_dropdown_list',
    root: 'Records',
    totalProperty: 'Total',
    fields:[
    {
        name: 'id'
    },
    {
        name: 'name'
    }
    ]
});

// Loading Mask
new Ext.LoadMask(Ext.getBody(),{msg:'Loading data...', store: objectAStore});

If you want a loading mask for a grid panel, simply set GridPanel's property "loadMask" to true

1 comment: