1. #1
    Sencha User austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    67
    Vote Rating
    0
    austin1030 is on a distinguished road

      0  

    Default Unanswered: TreePanel with loadMask

    Unanswered: TreePanel with loadMask


    Hi

    I've been looking for a solution for loadMask on my TreePanel.

    Since, I don't know which version, loadMask for TreePanel no longer works.

    Here how I set up my code.

    panel.js
    Code:
    createEmpPanel: function(){                
            this.leftPanel = Ext.create('widget.emptreelist', {                
                region: 'west',
                collapsible: true,
                width: isMaster(currstatus)? 315 : isUser(currstatus)? 200 : 280,
                minWidth: isMaster(currstatus)? 315 : isUser(currstatus)? 200 : 280,
                split: true,            
                padding: '0 0 0 1',                        
                listeners: {
                  scope: this,
                  itemdblclick: this.onEmpSelect
                }
            });
    
            return this.leftPanel;
        },
    treePanel.js
    Code:
    Ext.apply(this, {                        
              store: this.createTreeStore(),
              tbar: this.topToolbar,                    
              bbar: this.bottomToolbar,                        
              viewConfig: {
                     scope: this,                                        
                     listeners: {                                        
                            itemcontextmenu: function(view, record, node, index, e) {
                                     e.stopEvent();
                                     if(record.get('cls') == 'user') {                                                     
                                       userMenu1.showAt(e.getXY());
                                    } else if(record.get('cls') == 'inactive-user') {                                                     
                                       userMenu2.showAt(e.getXY());
                                    } else {
                                        folderMenu.showAt(e.getXY());
                                    }
                                     return false;
                            }
                     }
            }
    });
    I just couldn't figure out where I should setup setLoading() or other method.

    Thanks for your help

  2. #2
    Sencha User Arg0n's Avatar
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    93
    Vote Rating
    9
    Answers
    10
    Arg0n will become famous soon enough

      0  

    Default


    First, Loadmask is debricated.

    Use:

    Code:
    component.getEl().mask(); 
    component.getEl().unmask();
    Second, when do you want to to show the mask?

  3. #3
    Sencha User austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    67
    Vote Rating
    0
    austin1030 is on a distinguished road

      0  

    Default


    I want to load mask when data is loading for treepanel.

    I'll try your method.

Tags for this Thread