Anvil Widget Version 1.1, May 21, 2015

8276
1
05-21-2015 03:13 PM
Labels (1)

Anvil Widget Version 1.1, May 21, 2015

2/18/2017 --- updated download link

This widget is a sample of how to create a "headless" widget for the Wed AppBuilder (WAB).  By "headless," I mean it is invisible and it is loaded at startup.  It can add new functionality to the WAB such as map tips on feature layers, modify the appearance/behavior of other widgets using Dojo's Aspect Oriented Programming techniques (aspect.before, aspect.after, aspect.around).  The only limit is your imagination.

There is no live sample for this widget, as it is invisible.

I called it Anvil because the original "headless" widget I wrote is called Acme, and I wanted to stay with the Roadrunner theme.

This widget does nothing except show a message when it loads, and also if you double-click the map while holding down the Control and Alt keys.  (The double-click while holding down the Control and Alt keys feature obviously won't work on devices without Control and Alt keys.)

If you want to drop this widget into the WAB and configure it in an app, you will need to copy its folder into the client\stemapp\widgets folder and then add it to the client\stemapp\predefined-apps\default\config.json file.

If you want to add this widget to an app you have already built with the WAB, then add it to the main config.json file like this:

"widgetOnScreen": {
  "widgets": [
  {
    "uri": "widgets/Anvil/Widget",
    "position": {
      "left": -1000,
      "bottom": -1000
    },
    "version": "1.1",
    "id": "widgets/Anvil/Widget_101",
    "positionRelativeTo": "map",
    "name": "Anvil",
    "label": "Anvil"
    },
    . . .
    . . .
  ],
  "panel": {
    "uri": "jimu/PreloadWidgetIconPanel",
    "positionRelativeTo": "map"
  }
},
. . .
. . .

Anvil-1.1-2015-5-21.zip

https://community.esri.com/docs/DOC-9622-anvil-11-2015-5-21zip 

Larrys Custom WAB Widgets and More

Labels (1)
Comments

I must be doing something terribly wrong.

No message shows, no CTRL+ALT [Double Click on map] does anything...

THe anvil shows up right beside the attribute table in the WABde....  Can configure the JSON..

nothing happens though..

Tried both methods (in the Web App itself) but run into the dilemma with this:  as the Config already has a 'Panel' but url of   jimu/OnScreenWidgetPanel    and there is no PreloadWidgetIconPanel.js either.  (Ive also tried adding this to jimu.js folder.. no luck

  1.   "panel": { 
  2.     "uri": "jimu/PreloadWidgetIconPanel"
  3.     "positionRelativeTo": "map" 

  both in WAB 1.1 and WAB 1.2  

Tried under the server//Apps//##  and tried under Client//stemapp as suggested.
Nothing.

I have One layer in map, Call the LayerName as suggested...

Can Anyone suggest anything or help me out?

Greatly appreciated!

-Mike

Version history
Revision #:
1 of 1
Last update:
‎05-21-2015 03:13 PM
Updated by:
 
Contributors