Some questions about custom widgets.

1042
3
09-22-2016 02:22 PM
EvelynHernandez
Occasional Contributor III

Hello.

Im trying to developing a custom widget for my WAB APP and im following the steps in this website Naming conventions—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

1.- I understood that each widget has some files that has to be in there , like:

html file

css file

js.file 

and in the app.config when i want to add the custom widget or anyone that i want, i have to put this:

{ "label": "demo", "uri": "widgets/Demo/Widget" } in the widgetPool->widgets.

Idk if im kinda lost or im doing something wrong, but when i zip my app to upload it to the WAB to see if i can see my demo widget, i have the error with it.

So i dont understand whats is my problem.

2.- Also i wanna know if i can integrate React to handle some controls and state of them and if there is any example with it.

Or changing the code to ES6.

Thanks so much in advice!

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   This error means you have some resource missing in your widget folder. Could be a NLS string or an image or a css file. If you attach your custom widget I will have a look. As far as the react or ES6 I have not seen any sample code for that.

0 Kudos
EvelynHernandez
Occasional Contributor III

I attach the demo im doing.

I would like to know what im missing !

Thanks!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   Right off the bat I see that you do not have a manifest.json in your folder. Though the Required Files help doc does not say it is a required file it may as well be.

Required files—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

The manifest.json tells WAB many important things about your widget and if certain resources exist for your widget.

Attached is your widget working.

Also you may want to start with the [install dir]\client\stemapp\widgets\samplewidgets\CustomWidgetTemplate  as a template for your custom widgets in the future.