Deploying an inPanel = false Widget

3988
2
03-06-2015 12:30 PM
County_of_SimcoeGIS
New Contributor

Hello,

I am wondering how to properly deploy a widget that does not sit in a Panel (similar to the Home Button Widget or Locate Widget).

Basically I copied the Home Button widget and renamed a few properties (i.e. Name etc..) and copied it into the "\client\stemapp\widgets" folder.

The issue is it does not show up in the Web App "Builder"  application (even after restart)

After looking around at the files it seems like these types of widgets may have to be predefined in a themes layout configuration, is that correct?

Is there anyway I can create a custom widget, that does not site in a panel and deploy it to the Web App Builder without having to define the widget in the theme?

DOCS:

Deploy your widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

Thanks,

Drew

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Drew,

   Are you wanting to add this widget to one specific app of have all defaults apps use this widget?

Either way this type of widget is not available to add in the GUI without some manual configuration first.

If for just one specific app then there two steps:

  1. Copy the widgets folder to the apps widgets folder i.e. \server\apps\xx\widgets
  2. Add the widget manually to the \server\apps\xx\config.json

Example:

     {

        "uri": "widgets/customHomeButton/Widget",

        "position": {

          "left": 7,

          "top": 145

        },

        "version": "1.1",

        "id": "widgets/customHomeButton/Widget_77",

        "positionRelativeTo": "map",

        "name": "customHomeButton",

        "label": "Custom Home Button"

      },

If adding it to the default for all future apps (the user can still make it not visible like the others) then there is just one step:

  1. Add the above sample json code to the \client\builder\predefined-apps\default2DApp\config.json
County_of_SimcoeGIS
New Contributor

Thanks for the reply Rob.

I was hoping there would be a way to add these types of widgets without a UI to the "/widget/" folder and the Web App Builder could just pick it up and I would have a settings file that would allow the user to position it (top left bottom right) manually..

Thanks for the clarification.

Drew

0 Kudos