Minimize AttributeTable Widget

639
2
Jump to solution
02-07-2017 04:42 AM
Labels (1)
GilbertoMatos
Occasional Contributor II

Hello!

I mounted a custom buffer widget. I need that after the user clicks on the "Clear Buffers" button, if the attributetable widget is open (taking the bottom of the screen, for example), it is minimized. I tried the following way and I did not succeed. Any help

will be welcome.

NOTE: The close option works correctly, but minimizing does not occur.
Thank you!

this.wManager = WidgetManager.getInstance();                        
if (this.wManager)
{
        var widgetCfg = this._getWidgetConfig('AttributeTable');
                            
        if (widgetCfg)
        {
                var attWidget = this.wManager.getWidgetByLabel(widgetCfg.label);
                if (attWidget)
                {                                    
                        //Works correctly
                        //this.wManager.closeWidget(attWidget);
                                    
                        //It does not work properly
                        this.wManager.minimizeWidget(attWidget);
                }
        }

}

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Gilberto,

  You need to call the _closeTable method in the Attribute Table Widget:

this.wManager = WidgetManager.getInstance();
if (this.wManager) {
        var widgetCfg = this._getWidgetConfig('AttributeTable');
        if (widgetCfg){
                var attWidget = this.wManager.getWidgetByLabel(widgetCfg.label);
                if (attWidget){                                   
                        attWidget._closeTable();
                }
        }
}

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Gilberto,

  You need to call the _closeTable method in the Attribute Table Widget:

this.wManager = WidgetManager.getInstance();
if (this.wManager) {
        var widgetCfg = this._getWidgetConfig('AttributeTable');
        if (widgetCfg){
                var attWidget = this.wManager.getWidgetByLabel(widgetCfg.label);
                if (attWidget){                                   
                        attWidget._closeTable();
                }
        }
}

View solution in original post

GilbertoMatos
Occasional Contributor II

It worked correctly!

Thank you Robert!

Gilberto.

0 Kudos