Is it possible to launch a widget from the default popup info window?

775
13
Jump to solution
06-11-2019 07:51 AM
Lake_Country_GIS
New Contributor III

I would like to launch a custom widget from the default popup info window in a WebAppBuilder app (add a button or link). Is this possible?

Thanks in advance,

M

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Add your feature action to the jimu.js\featureActions folder and then add your action to the main.js in the jimu.js\featureActions folder.

View solution in original post

13 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Yes for that you should add a custom feature action to your widget.

https://developers.arcgis.com/web-appbuilder/guide/create-a-feature-action-in-your-widget.htm

0 Kudos
Lake_Country_GIS
New Contributor III

Thanks Robert.

I can add this to my own widget, but what about adding it to the default ArcGIS Online identify popup window?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Add your feature action to the jimu.js\featureActions folder and then add your action to the main.js in the jimu.js\featureActions folder.

Lake_Country_GIS
New Contributor III

Worked like a charm. Now, is it possible to launch/expand a custom sidebar widget as well? 

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Sure just get your reference to that widget and open it.

0 Kudos
Lake_Country_GIS
New Contributor III

OK, the widget launches, however, my custom widget requires the sidebar to be opened. And, I would also need to close the info-window. Is there a way to expand the sidebar?

WidgetManager.getInstance().triggerWidgetOpen('widgets_PropertyReport_Widget_48')

See demo here:

https://www.lakecountry.bc.ca/maps/maps/

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
0 Kudos
Lake_Country_GIS
New Contributor III

Once again, works like a charm, however, do get a JS error:

init.js:114 Error: Tried to register widget with id==widgets_PropertyReport_Widget_48_panel but that id is already registered

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Is that widget configured to open at startup?

0 Kudos