I am trying to utilize PanelManager in my WAB widget. My WAB version is very old (1.2). I am trying to add it as follows:
define([
 //dojo AMD modules
...
//dojox AMD modules
 ..
//dGrid AMD modules
 ...
//dijit AMD modules
 ...
//esri AMD modules
 ...
//jimu web appbuilder AMD modules
 'jimu/BaseWidget',
 'jimu/utils',
'jimu/WidgetManager'
'jimu/ PanelManager '
],
 function (
 //dojo AMD modules
 ...
//dojox AMD modules
 ...
//dgrid AMD modules
 ...
//dijit AMD modules
 ...
//esri AMD modules
 ...
//jimu web appbuilder AMD modules
 BaseWidget,
 utils,
...
WidgetManager
PanelManager
) {
// Code goes her
Notice that there are spaces when I add 'jimu/ PanelManager '. This is exactly the way the documentation has it, but when I try to launch my app, it doesn't load because it is incorrect. When I change it to 'jimu/PanelManager' (with spaces removes it loads, but when I try to create an instance variable (see below), I get the error: "Uncaught ReferenceError: PanelManager is not defined". What am I doing wrong here?
wm.loadWidget(myWidget); 
wm.openWidget(myWidget); 
var pm = PanelManager.getInstance(); 
pm.showPanel(myWidget);
Solved! Go to Solution.
Justin,
I just checked an old 1.2 version and I have
And I call it this way
Without any error.
Justin,
There is No space in there the documentation has a typo.
I eliminated the spaces, but I still got the "Uncaught ReferenceError: PanelManager is not defined" whenever I tried to create an instance of the PanelManager:
var pm = PanelManager.getInstance();
Justin,
I just checked an old 1.2 version and I have
And I call it this way
Without any error.
Aha! I just tried using `this.` That seemed to do the trick.
