Using the same featureAction in multiple widgets

551
3
Jump to solution
06-27-2019 11:13 AM
MaximeDemers
Occasional Contributor III

I have created a featureAction that I want to be enabled in the Select, AttributeTable and a custom Geoprocessing Widget. This featureAction when executed open another widget panel.

I would like to store only one copy of the featureAction in the widget directory that is opened when executed.

However, it seems that the icons and nls must be copied in every widgets where the featureAction is enabled.

Is there a way to store the icons and nls into one place only?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

You would not need to since it is part of the apps feature actions. Just add your action to the jimu/featureActions/main.js and in the feature actions is FeatureSupported method you can do some testing to see if this action should be added. It will be part of the apps popup period and will not need a specific widget to be opened to add it to the popup.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

The only way that I am aware of is to place the featureAction in the jimu\featureActions folder. That way it is available to the whole WAB App.

0 Kudos
MaximeDemers
Occasional Contributor III

Thank you! I'll try that.

What am I supposed to write for the "uri" in the manifest.json of the widgets to register the featureAction?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

You would not need to since it is part of the apps feature actions. Just add your action to the jimu/featureActions/main.js and in the feature actions is FeatureSupported method you can do some testing to see if this action should be added. It will be part of the apps popup period and will not need a specific widget to be opened to add it to the popup.