Select to view content in your preferred language

Custom widget setting page cannot be summited

4065
11
12-08-2017 10:24 AM
AlfonsoYañez_Morillo
Regular Contributor

Hi all,

I'm working on the setting page to set the url and fields a widget needs. I used the search widget as a model to follow. The setting page works fine getting the information, however there is one detail I cannot answer and makes the page useless. When I click on the OK button to accept the settings a popup appears with the message "Label Exists", but nothing happens; the getConfig Method is not called, so the config.json is not updated, and on the other hand the page is not closed.

Thanks for the help,

Alfonso

0 Kudos
11 Replies
AlfonsoYañez_Morillo
Regular Contributor

Thanks Robert,

Yes, it was strange. I also disabled the setting option in the manifest and the popup shows the config.json. But when I try to close the popup clicking on the OK button, happens the same. The same alert with the message “the label exists”. I was completely stuck because I thought was something in the code that changed something behind. I think code that manages the button was corrupted, so the panel that wraps the setting page didn’t work well. I created a new widget and copied the files there, and it worked.

I would like to raise new questions related with the same widget. If the source selected requires a token, what’s the way to ask if it is required and, is it a good idea to store the credentials in the widget’s config.json?

Thank you again

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alfonso,

  No do not store the credential in the config json as this is a easily readable file and can be easily read as it is passed from the server to the client. If the layer requires a login then just let WAB challenge the user with the identity manager to get the users login.

0 Kudos