0

I copied the setting page from the Demo widget and I try to adjust it to suit my widget. My config.json contains the configText variable and several others as well. When I open the config window for my widget in app1, I see only the config.json contents, not UI as for other widgets. I can edit the JSON code freely.

So far I found no way to use any more complex debugging options or even how to debug the settings.js through FireBug (I can debug Widget.js, which works), so I can't confirm that the setting code is not even loaded, but it doesn't seem to respond to changes in my setting.js or setting.html files. The files seem to be on their places (config is read from WABRoot/server/apps/6/configs/MyWidget/config_MyWidget.json and the widget from WABRoot/server/widgets/MyWidget/), though I might have forgotten to check something. The setting code is exactly like in the Demo widget, except I renamed baseClass from jimu-widget-demo-setting to jimu-widget-my-widget-setting.

What else can I do, and especially, why do I get the json instead of the UI?

I reposted this on the ESRI support forum.

1

I have another app, let's call it app2.
In it, my widget's settings returned an error:

Create widget setting page error:widget/MyWidget/Widget

I tried to find out the reason for the different behavior, so I copied the setting code from app1 to app2.

Before, there was an error in app2 due to failed attempt to copy another widget's settings there (more complex than the Demo widget's), and it was corrected by this simplification, so the settings page shows normally now in app2.

In app1, I still saw the config.json until I found that I have the "hasSettingPage", "hasSettingUIFile", "hasSettingLocale" and "hasSettingStyle" set to false.
I changed them to true and the issue is solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.