Select to view content in your preferred language

Widget Configuration

3443
3
Jump to solution
07-07-2015 09:33 PM
HamishKingsbury1
Deactivated User

Hey there

I've made a widget, now I'm trying to setup the customization (to specify URLs ect). I've got the template all set up with the necessary fields ect. How do I now pass these through Setting.js into Widget.js. The documentation on this step is extremely limited and I have found it very unhelpful.

Cheers

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Hamish,

   From inside your Widget.js you can use "this.config.YOURPROPERTY" it's that simple.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Hamish,

   From inside your Widget.js you can use "this.config.YOURPROPERTY" it's that simple.

HamishKingsbury1
Deactivated User

Thank you Robert!! Your help has been fantastic.

0 Kudos
HamishKingsbury1
Deactivated User

So i'm having issues with this, I managed to set a 'test' config value, which will come up in an alert(). But when i change the value in config.json it remains the same. I have restarted the server, used incognito mode, copied the widget from app/4/ to stemapp but none of these show the changed value

EDIT Okay, so I found where I was going wrong, changed the wrong config file. I feel like ESRI really really needs to improve their documentation on this...