AnsweredAssumed Answered

Launchpad theme and panelmanager problem

Question asked by alterwiel on Nov 22, 2015
Latest reply on Nov 23, 2015 by alterwiel

I've been trying to open a widget from another widget. The code I have works fine for Foldable theme but not for Launchpad theme.

 

_showWidget: function (widgetName) {
  var wm = WidgetManager.getInstance();
  var pm = PanelManager.getInstance();
  var myWidget = null;
  arrayUtils.some(wm.appConfig.widgetPool.widgets, function (aWidget) {
   if (aWidget.name === widgetName) {
     myWidget = aWidget;
   }
  });

  if (myWidget) {
   var controller = wm.getWidgetsByName("AnchorBarController");
   if (controller.length > 0) {
     var deferred = pm.showPanel(myWidget);
     deferred.then(function (panel) {
       //pm.minimizePanel(panel);
       pm.normalizePanel(panel);
       //pm.maximizePanel(panel);
     });
   }
   else {
     pm.showPanel(myWidget);
   }
  }
},

 

line 17 and 19 both work i.e. they perform as expected, but line 18 does nothing. My panel is still hidden.

Outcomes