Hi,
I am trying to open the other panel and closing the current panel by using the below code, which is working for Foldable theme in WAB but not working for Box theme correctly.
var pm = PanelManager.getInstance();
var layerListWidget = null;
layerListWidget = pm.widgetManager.appConfig.widgetPool.widgets[0];
PanelManager.getInstance().closePanel(this.id + "_panel");
PanelManager.getInstance().showPanel(layerListWidget);
Do anyone have any idea, how to achieve this for Box Theme?
Solved! Go to Solution.
Naveen,
You need to do this through the BoxController. Use the setOpenedIds method, it handles closing opened widget and opening the one you want opened.
var bc = WidgetManager.getInstance().getWidgetsByName("BoxController")[0];
bc.setOpenedIds([layerListWidget.id]);
Naveen,
You need to do this through the BoxController. Use the setOpenedIds method, it handles closing opened widget and opening the one you want opened.
var bc = WidgetManager.getInstance().getWidgetsByName("BoxController")[0];
bc.setOpenedIds([layerListWidget.id]);