modification to foldable theme not working with my custom widget (maybe ...)

1911
3
Jump to solution
02-09-2016 02:40 PM
TracySchloss
Frequent Contributor

I first made the suggested change by @Robert Scheitlin to add one more color to the Foldable Theme.  This was pretty straight forward.  Our web pages are blue, but not the same shade.  I've lost track of the thread where he suggested it ... 

Next I started working through the sample exercise in the documentation on creating your own widget.  Everything seems to be fine there.  I copied it from the samplewidget folder into Widgets.  It shows up just fine as a widget I can add. But once I do, it just sits there at a configuration window.

Is there something missing in the sample code instructions, or could there possibly be a conflict with the theme I created?  I tried switching to another color, still in the Foldable Theme, but my widget still doesn't load properly.  There are no errors in the console (I hate that!).

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Tracy,

   The CustomWidgetTemplate in the samplewidget folder does not have a settings folder or code so you will not get anything when you add the widget and the settings dialog portion appears. Just click on the ok button and then the widget will work unless you have a problem in the widget code.

I think this is the link you are reffering to:

Help changing color in a Template Web App Theme

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Tracy,

   The CustomWidgetTemplate in the samplewidget folder does not have a settings folder or code so you will not get anything when you add the widget and the settings dialog portion appears. Just click on the ok button and then the widget will work unless you have a problem in the widget code.

I think this is the link you are reffering to:

Help changing color in a Template Web App Theme

0 Kudos
TracySchloss
Frequent Contributor

Once again the ESRI instructions are skimping on their details.  It would have been nice to know that it was going to 'hang' in that section.  Everything is working fine.  Obviously I have more reading to do on defining settings of a widget.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Tracy,

   The issue in the CustomWidgetTemplate sample code is that the manifest.json has properties that say there is settings files (when there are not).

"properties": {

        "inPanel":true,

        "hasLocale": true,

        "hasStyle":true,

        "hasConfig":true,

        "hasUIFile":true,

        "hasSettingPage":true,

        "hasSettingUIFile":true,

        "hasSettingLocale":true,

        "hasSettingStyle":true,

        "IsController":false

  }

If you set those to false or delete them altogether (my preference) then you will not get that hang and you will see a json editor instead.

0 Kudos