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
Alfonso,
I do not see any code so it is hard to say.
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
Alfonso,
I am not seeing the html or the js code.
Alfonso,
What about the SourceSetting.html and _FeaturelayerLimitedSourcePopup.js?
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:
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
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.