Search code examples
extjspanels

ExtJS 4.X.X disable all panels at once


How would I disable all forms and panels in ExtJS at once, ideally before function call and then enable after the function is complete?


Solution

  • If you're using ExtJS 4, you can do something like this...

    var panels = Ext.ComponentQuery.query('panel');
    if (panels.length) {
        for (var i = 0, l = panels.length; i < l; i++) {
            panels[i].disable();
        }
    }