AnsweredAssumed Answered

Control Widget Accessibility and/or Visibility

Question asked by jamesfreddyc on May 11, 2018
Latest reply on May 11, 2018 by jamesfreddyc

Theme: Launchpad
WabDev 2.7

Related Thread


In addition to opening a particular widget from an existing widget (ScaleBar widget) when the app loads, I need to remove or disable another widget in the widgetpool.  Remove it or disable it is fine, whichever is easiest.


var widgetsConfig = this.appConfig.widgetPool.widgets;
            var widgetId;
            for (var i in widgetsConfig) {
                if (widgetsConfig[i].name == "My Widget Name") {
                    widgetId = widgetsConfig[i].id;
            var abc = WidgetManager.getInstance().getWidgetsByName("AnchorBarController")[0];
            abc.setOpenedIds([widgetId]); //this opens the desired widget
            // I need to remove it from the Controller or just deactivate it somehow.
            abc.removeFromController([widgetId]); //or some such thing