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
Solved! Go to Solution.
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.
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
Thanks Robert.
I can add this to my own widget, but what about adding it to the default ArcGIS Online identify popup window?
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.
Worked like a charm. Now, is it possible to launch/expand a custom sidebar widget as well?
Sure just get your reference to that widget and open it.
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:
See this thread:
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
Is that widget configured to open at startup?