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);
}
}
}
Solved! Go to Solution.
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();
}
}
}
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();
}
}
}
It worked correctly!
Thank you Robert!
Gilberto.