Select to view content in your preferred language

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

1915
13
Jump to solution
06-11-2019 07:51 AM
Lake_Country_GIS
Frequent Contributor

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 Emeritus

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 Emeritus

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
Frequent Contributor

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 Emeritus

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
Frequent Contributor

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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

0 Kudos
Lake_Country_GIS
Frequent Contributor

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 Emeritus
0 Kudos
Lake_Country_GIS
Frequent Contributor

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 Emeritus

Is that widget configured to open at startup?

0 Kudos