Open a widget from another widget

Jump to solution
07-28-2016 02:22 AM
Occasional Contributor

How to open a widget from another widget. I have a scenario like, After getting the resulted location in map(Search widget) it should open the Identify widget. Which of the files need to be edited in both widgets.

Thanks in advance.

0 Kudos
14 Replies
New Contributor III

I get my purpose I have a code here : 

Thanks for all Robert  ! 

0 Kudos
Occasional Contributor

Hi Robert,

Thank You very much for such a kind support !!!

Now I am able to open the the draw widget after getting the results from search widget. But  there are few error in console while opening the draw widget.

Error: Tried to register widget with id==widgets_Draw_Widget_35_panel but that id is already registered (2 times)

Error: Uncaught TypeError: Cannot read property 'started' of undefined (2 times)

Also attached the screenshot for the same for better understanding.ConsoleError.png



0 Kudos
MVP Esteemed Contributor


So it turns out that the code to open the draw widget in the TabTheme should be:

     _openDrawWidget: function() {

          var drawWidget, sbc;

          var widgetCfg = this._getWidgetConfig('Draw');

          if (widgetCfg) {

              sbc = WidgetManager.getInstance().getWidgetsByName("SidebarController")[0];





View solution in original post

Occasional Contributor

Thanks Robert.

the problem got resolved.

Thanks again....

0 Kudos
Occasional Contributor


    I have a scenario like, when I search for an area in map, it should automatically open the Identify widget along with the resulted area in Map. As per the requirement I'm able open Identify Widget along with the resulted area, but Sometimes only

I'm getting an ERROR like: 

     " init.js:199 Error: Tried to register widget with id==widgets_Identify_Widget_33_panel but
       that id is already registered(…) "Error: Tried to register widget with
       id==widgets_Identify_Widget_33_panel but that id is already registered
      at Error
      at Object.add (
      at create

If there is NO ERROR, it's showing like:

" panel [widgets_Identify_Widget_33_panel] created.
Widget.js:261 <font color='#000000'><em>
[attribname]</em></font>: <font color='#000000'>[attribvalue]</font><br>
WidgetManager.js:115 widget [widgets/Identify/Widget] created. "

Here, I'm attaching the screenshot of ERROR.

So, please suggest me what should be done.

Thanks in advance...



0 Kudos