Custom widget setting page cannot be summited

1141
11
12-08-2017 10:24 AM
AlfonsoYañez_Morillo
New Contributor III

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
RobertScheitlin__GISP
MVP Esteemed Contributor

Alfonso,

   I do not see any code so it is hard to say.

0 Kudos
AlfonsoYañez_Morillo
New Contributor III

Robert,

The setting.html file is as follows:









And the setting.js is attached

You will see the seeting.js has dependencies on the ./SourceSetting which is a modified version of the search widget’s QuerySourceSetting.js and html and ./utils which is a copy of the original.

The problem raises when I click on an element not managed directly with the code. The cancel button and the top-right X perfectly close and destroy the setting panel. But the OK Button apparently has lost its functionality. It is suppose the OK button raises the getConfig method and close the panel, then I created a demo widget to check if the button works correctly and it did.

[cid:image002.jpg@01D37039.6FC20770]

The widget captures the information correctly and for testing purposes, I forced the getConfig method to work seeing it retrieves the data well.

Maybe I need to catch the event associated with the ok and force the panel to close and call the getConfig.

Thank you

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Alfonso,

   I am not seeing the html or the js code.

0 Kudos
AlfonsoYañez_Morillo
New Contributor III

I’m trying again. I placed the setting.js, the SourceSetting.js and the setting.html in a text file. I think there is some king of filter in my outlook to prevent some kind of files.

As I commented before, the ./utils is a copy of the utils.js from the widgets/search widget.

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Alfonso,

   What about the SourceSetting.html and _FeaturelayerLimitedSourcePopup.js?

0 Kudos
AlfonsoYañez_Morillo
New Contributor III

Sorry, that’s right, I forgot it!!

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Alfonso,

   It is a lot easier for me to debug is I can get your widget partially running on my end. Can you provide the:

  • _FeaturelayerLimitedSourcePopup.js
  • widgets config.json
0 Kudos
AlfonsoYañez_Morillo
New Contributor III

Robert,

I think it’ll be easier if you use the jimu/dijit/FeatureLayerSourcePopup.

The _FeaturelayerLimitedSourcePopup and its modified dependencies are a copy of the jimu/dijit/FeatureLayerSourcePopup where I bind the radio option for Map. Substituting _FeatureLayerLimitedSourcePopup by FeatureLayerSourcePopup should works.

Thanks,

Alfonso

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Alfonso,

   Strange I have taken everything you have given me and added it to a custom widget on my end and I have no problem saving the settings dialog information.

0 Kudos