AnsweredAssumed Answered

Open Widget Programatically ( Foldable Theme)

Question asked by krishnavsav on Aug 7, 2018
Latest reply on Aug 7, 2018 by krishnavsav

Open a widget from another widget 

 

 

 

 

var widgetCfg = this._getWidgetConfig('Edit');
            var wm = WidgetManager.getInstance();
            wm.loadWidget(widgetCfg).then(lang.hitch(this,function(){

              if (widgetCfg) { 
                //sbc = WidgetManager.getInstance().getWidgetsByName("headerController")[0]; 
                printWidget = WidgetManager.getInstance().getWidgetByLabel(widgetCfg.label); 
                if (printWidget) { 
                    
                    WidgetManager.getInstance().openWidget(printWidget); 
                   
                      PanelManager.getInstance().showPanel(printWidget);
                   
                } else { 
                    //sbc.setOpenedIds([widgetCfg.id]); 
                    //sbc._resizeToMax(); 
                    setTimeout(function() { 
                        printWidget = WidgetManager.getInstance().getWidgetById(widgetCfg.id); 
                        WidgetManager.getInstance().openWidget(printWidget); 
                        PanelManager.getInstance().showPanel(printWidget); 
                    }, 3000); 
                } 
   
              }

 

Please let me know, how I can open Edit Widget in Foldable Theme.

 

Regards,

Krish

Outcomes